import type { GlobalTheme } from '../global'; const getTagTheme = (theme: GlobalTheme) => { const borderWidths = { default: theme.borderWidths.base, }; const colors = { primary: theme.colors.primary, primaryBackground: theme.colors.highlightedSurface, info: theme.colors.onInfoSurface, infoBackground: theme.colors.infoSurface, success: theme.colors.onSuccessSurface, successBackground: theme.colors.successSurface, warning: theme.colors.onWarningSurface, warningBackground: theme.colors.warningSurface, danger: theme.colors.onErrorSurface, dangerBackground: theme.colors.errorSurface, archived: theme.colors.onArchivedSurface, archivedBackground: theme.colors.archivedSurface, text: theme.colors.onDefaultGlobalSurface, neutral: theme.colors.onDefaultGlobalSurface, neutralBackground: theme.colors.neutralGlobalSurface, }; const fonts = { default: theme.fonts.neutral.medium, }; const fontSizes = { default: theme.fontSizes.small, }; const lineHeights = { default: theme.lineHeights.small, }; const space = { horizontalPadding: theme.space.small, verticalPadding: theme.space.xsmall, iconGap: theme.space.xsmall, }; const radii = { default: theme.radii.large, }; return { borderWidths, colors, fonts, fontSizes, space, radii, lineHeights }; }; type GetTagThemeReturnType = ReturnType; export interface TagThemeType extends GetTagThemeReturnType { /** * @deprecated will be removed in v9 * */ fonts: GetTagThemeReturnType['fonts']; /** * @deprecated will be removed in v9 * */ fontSizes: GetTagThemeReturnType['fontSizes']; /** * @deprecated will be removed in v9 * */ lineHeights: GetTagThemeReturnType['lineHeights']; } export default getTagTheme;