From f366a681592a062cee1c2537fcd6e10f518c34ed Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Wed, 8 Jan 2020 14:00:25 +0100 Subject: [PATCH] Convert theme.js to typescript Change-type: patch --- lib/gui/app/theme.js | 71 -------------------------------------------- lib/gui/app/theme.ts | 65 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 71 deletions(-) delete mode 100644 lib/gui/app/theme.js create mode 100644 lib/gui/app/theme.ts diff --git a/lib/gui/app/theme.js b/lib/gui/app/theme.js deleted file mode 100644 index 2cdf0453..00000000 --- a/lib/gui/app/theme.js +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2018 balena.io - * - * Licensed under the Apache License, Version 2.0 (the "License"), - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -'use strict' - -exports.colors = { - dark: { - foreground: '#fff', - background: '#4d5057', - soft: { - foreground: '#ddd', - background: '#64686a' - }, - disabled: { - foreground: '#787c7f', - background: '#3a3c41' - } - }, - light: { - foreground: '#666', - background: '#fff', - soft: { - foreground: '#b3b3b3' - }, - disabled: { - foreground: '#787c7f', - background: '#d5d5d5' - } - }, - default: { - foreground: '#b3b3b3', - background: '#ececec' - }, - primary: { - foreground: '#fff', - background: '#2297de' - }, - secondary: { - foreground: '#000', - background: '#ddd' - }, - warning: { - foreground: '#fff', - background: '#fca321' - }, - danger: { - foreground: '#fff', - background: '#d9534f' - }, - success: { - foreground: '#fff', - background: '#5fb835' - } -} - -exports.consts = { - btnMaxWidth: '170px' -} diff --git a/lib/gui/app/theme.ts b/lib/gui/app/theme.ts new file mode 100644 index 00000000..bfebe600 --- /dev/null +++ b/lib/gui/app/theme.ts @@ -0,0 +1,65 @@ +/* + * Copyright 2018 balena.io + * + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export const colors = { + dark: { + foreground: '#fff', + background: '#4d5057', + soft: { + foreground: '#ddd', + background: '#64686a', + }, + disabled: { + foreground: '#787c7f', + background: '#3a3c41', + }, + }, + light: { + foreground: '#666', + background: '#fff', + soft: { + foreground: '#b3b3b3', + }, + disabled: { + foreground: '#787c7f', + background: '#d5d5d5', + }, + }, + default: { + foreground: '#b3b3b3', + background: '#ececec', + }, + primary: { + foreground: '#fff', + background: '#2297de', + }, + secondary: { + foreground: '#000', + background: '#ddd', + }, + warning: { + foreground: '#fff', + background: '#fca321', + }, + danger: { + foreground: '#fff', + background: '#d9534f', + }, + success: { + foreground: '#fff', + background: '#5fb835', + }, +};