Skip to content

Commit

Permalink
feat(bezier-react): update ColorProps type to support alpha color tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
sungik-choi committed Jan 7, 2025
1 parent 7875415 commit bfb24f9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/bezier-react/src/types/props.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { JSX } from 'react'

import { type FunctionalAndSemanticColor } from './alpha-tokens'
import type {
BackgroundSemanticColor,
BackgroundTextSemanticColor,
Expand All @@ -10,6 +11,8 @@ import type {
ZIndex,
} from './tokens'

type LegacyAndAlphaSemanticColor = SemanticColor | FunctionalAndSemanticColor

/**
* Props for overriding default styles of components. Intended for exceptional use cases where default styles need customization.
*/
Expand Down Expand Up @@ -140,7 +143,7 @@ export interface ColorProps {
/**
* Color from the design system's semantic color.
*/
color?: SemanticColor
color?: LegacyAndAlphaSemanticColor
}

/**
Expand Down Expand Up @@ -179,7 +182,7 @@ export type AdditionalOverridableStyleProps<ElementName extends PropNameType> =
* Props for adding color properties to named elements within a component.
*/
export type AdditionalColorProps<ElementName extends PropNameType> =
AdditionalProps<ElementName, 'color', SemanticColor>
AdditionalProps<ElementName, 'color', LegacyAndAlphaSemanticColor>

/**
* Props for components that can be activated or deactivated.
Expand Down

0 comments on commit bfb24f9

Please sign in to comment.