/
kaws
/
ui-kit-ce
Обзор
Документация
Войти
/
kaws
/
ui-kit-ce
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/theme/src/comp/link.ts
53 строки
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 createLink = (theme: Theme, compatibilityMode?: boolean) => ({ colorText: compatibilityMode ? theme.colourway.link : theme.ref.palette.electricBlue50, colorTextHover: compatibilityMode ? theme.colourway.linkHover : theme.ref.palette.electricBlue40, colorTextActive: compatibilityMode ? theme.colourway.linkActive : theme.ref.palette.electricBlue30, colorTextDisabled: compatibilityMode ? theme.colourway.disabledMajor : theme.sys.color.disabledHigh, colorTextVisited: compatibilityMode ? theme.colourway.linkVisited : theme.ref.palette.orchid40, widthShadowFocus: compatibilityMode ? 2 : theme.sys.shape.borderWidthThick, colorShadowFocus: compatibilityMode ? theme.colourway.focus : theme.sys.color.focus, shapeBorderRadiusTopLeft: compatibilityMode ? 0 : theme.sys.shape.borderRadiusNone, shapeBorderRadiusTopRight: compatibilityMode ? 0 : theme.sys.shape.borderRadiusNone, shapeBorderRadiusBottomLeft: compatibilityMode ? 0 : theme.sys.shape.borderRadiusNone, shapeBorderRadiusBottomRight: compatibilityMode ? 0 : theme.sys.shape.borderRadiusNone, typographyFontFamily: compatibilityMode ? theme.typography.fontFamily.text : theme.sys.typography.bodyMd.fontFamily, typographyFontWeight: compatibilityMode ? theme.typography.fontWeight.regular : theme.sys.typography.bodyMd.fontWeight, typographyFontSize: compatibilityMode ? theme.typography.fontSize.body2 : theme.sys.typography.bodyMd.fontSize, typographyLineHeight: compatibilityMode ? theme.typography.lineHeight.body2 : theme.sys.typography.bodyMd.lineHeight, typographyLetterSpacing: compatibilityMode ? theme.typography.letterSpacing.body2 : theme.sys.typography.bodyMd.letterSpacing, })