/
Bybaleshqa
/
Forktest
Обзор
Документация
Войти
/
Bybaleshqa
/
Forktest
Код
Запросы
1
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/theme/src/comp/closeButton.ts
44 строки
2 KB
Pavel Uryadyshev
refactor: исправлены токены компонентов
24 май 2024, 16:41
24 май 2024, 16:41
1b97ab9
Код
Авторство
О чём код?
import { Theme } from '../interface' // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types export const createCloseButton = ( theme: Theme, compatibilityMode?: boolean ) => ({ colorText: compatibilityMode ? theme.colourway.onBackgroundHigh : theme.sys.color.onBackgroundHigh, colorTextHover: compatibilityMode ? theme.colourway.onBackgroundMedium : theme.sys.color.onBackgroundMedium, colorTextActive: compatibilityMode ? theme.colourway.onBackgroundLow : theme.sys.color.onBackgroundLow, colorTextDisabled: compatibilityMode ? theme.colourway.onWarningLow : theme.sys.color.disabledHigh, colorBackground: 'transparent', colorBackgroundHover: compatibilityMode ? theme.colourway.mono02 : theme.sys.color.onBackgroundOverlayHover, colorBackgroundActive: compatibilityMode ? theme.colourway.mono04 : theme.sys.color.onBackgroundOverlayActive, colorShadowFocus: compatibilityMode ? theme.colourway.focus : theme.sys.color.focus, colorBackgroundDisabled: 'transparent', shapeBorderRadiusTopLeft: compatibilityMode ? theme.shape.borderRadius : theme.sys.shape.borderRadiusMd, shapeBorderRadiusTopRight: compatibilityMode ? theme.shape.borderRadius : theme.sys.shape.borderRadiusMd, shapeBorderRadiusBottomLeft: compatibilityMode ? theme.shape.borderRadius : theme.sys.shape.borderRadiusMd, shapeBorderRadiusBottomRight: compatibilityMode ? theme.shape.borderRadius : theme.sys.shape.borderRadiusMd, })