/
bearury
/
ui-kit-ce
Обзор
Документация
Войти
/
bearury
/
ui-kit-ce
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/theme/src/comp/closeButton.ts
45 строк
2 KB
Denis Svyatovets
feat: добавлены токены толщины обводки
02 июл 2025, 10:08
02 июл 2025, 10:08
f23965f
Код
Авторство
О чём код?
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, widthShadowFocus: compatibilityMode ? 2 : theme.sys.shape.borderWidthThick, 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, })