Skip to content

Commit

Permalink
fix(comp): modify offline color token (#1789)
Browse files Browse the repository at this point in the history
  • Loading branch information
sallerli1 committed Jan 8, 2024
1 parent 7a8a89f commit 00cd10c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
23 changes: 21 additions & 2 deletions packages/components/alert/theme/tokens.ts
Expand Up @@ -6,14 +6,33 @@
*/

export interface AlertThemeTokens {
/**
* @desc 高度
*/
height: number
/**
* @desc 边框圆角
*/
borderRadius: number

// private

/**
* @private internal
*/
successBgColor: string
/**
* @private internal
*/
infoBgColor: string
/**
* @private internal
*/
warningBgColor: string
/**
* @private internal
*/
errorBgColor: string
/**
* @private internal
*/
offlineBgColor: string
}
Expand Up @@ -117,7 +117,7 @@ export function getDerivedColorTokens(
colorInfoText: infoColorPalette.base,
colorInfoTextHover: infoColorPalette.l10,
colorInfoTextActive: infoColorPalette.d10,
colorInfoIcon: infoColorPalette.l10,
colorInfoIcon: infoColorPalette.base,
}

const greyColors = getGreyColors()
Expand All @@ -130,8 +130,8 @@ export function getDerivedColorTokens(
...riskColors,
...fatalColors,
...infoColors,
colorOffline: greyColors.d10,
colorOfflineBg: greyColors.d10,
colorOfflineText: greyColors.d10,
colorOffline: greyColors.base,
colorOfflineBg: greyColors.base,
colorOfflineText: greyColors.base,
} as DerivedColorTokens
}
Expand Up @@ -14,6 +14,7 @@ export function getBasicTokens(
): BasicTokens {
const baseColors = getBaseColors()
const redColorPalette = getColorPalette(baseColors.red)
const blueColorPalette = getColorPalette(baseColors.blue)
const greyColors = getGreyColors()

return {
Expand All @@ -23,7 +24,7 @@ export function getBasicTokens(
colorWarning: baseColors.brown,
colorRisk: baseColors.orange,
colorFatal: redColorPalette.d30,
colorInfo: baseColors.blue,
colorInfo: blueColorPalette.l10,
colorLink: baseColors.blue,

colorWhite: baseColors.white,
Expand Down

0 comments on commit 00cd10c

Please sign in to comment.