/
kaws
/
ui-kit-ce
Обзор
Документация
Войти
/
kaws
/
ui-kit-ce
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/theme/src/comp/inputHelperText.ts
54 строки
2 KB
Denis Svyatovets
style: добавлен плагин eslint для jsDoc
27 янв 2025, 17:06
27 янв 2025, 17:06
6287359
Код
Авторство
О чём код?
import { Theme } from '../interface' // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types export const createInputHelperText = ( theme: Theme, compatibilityMode?: boolean ) => ({ colorText: compatibilityMode ? theme.colourway.onBackgroundLow : theme.sys.color.onBackgroundLow, colorTextError: compatibilityMode ? theme.colourway.error : theme.sys.color.errorAlpha, colorTextDisabled: compatibilityMode ? theme.colourway.onBackgroundDisabled : theme.sys.color.disabledHigh, //typography (base) typographyFontFamily: compatibilityMode ? theme.typography.fontFamily.text : theme.sys.typography.bodySm.fontFamily, typographyFontWeight: compatibilityMode ? theme.typography.fontWeight.regular : theme.sys.typography.bodySm.fontWeight, typographyLetterSpacing: compatibilityMode ? theme.typography.letterSpacing.caption : theme.sys.typography.bodySm.letterSpacing, //typography sm typographyFontSizeSm: '', typographyLineHeightSm: '', //typography md typographyFontSizeMd: '', typographyLineHeightMd: '', //typography lg typographyFontSizeLg: '', typographyLineHeightLg: '', //typography (old) /** * @deprecated Используйте соответствующие токены, в зависимости от нужного размера: `typographyFontSizeSm`, `typographyFontSizeMd` или `typographyFontSizeLg`. */ typographyFontSize: compatibilityMode ? theme.typography.fontSize.caption : theme.sys.typography.bodySm.fontSize, /** * @deprecated Используйте соответствующие токены, в зависимости от нужного размера: `typographyLineHeightSm`, `typographyLineHeightMd` или `typographyLineHeightLg`. */ typographyLineHeight: compatibilityMode ? theme.typography.lineHeight.caption : theme.sys.typography.bodySm.lineHeight, })