/
Bybaleshqa
/
Forktest
Обзор
Документация
Войти
/
Bybaleshqa
/
Forktest
Код
Запросы
1
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/theme/src/comp/link.ts
52 строки
2 KB
Denis Svyatovets
v1.10.0
27 мар 2024, 13:48
27 мар 2024, 13:48
c9029ae
Код
Авторство
О чём код?
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, 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, })