Skip to content

Commit bfb24f9

Browse files
committed
feat(bezier-react): update ColorProps type to support alpha color tokens
1 parent 7875415 commit bfb24f9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/bezier-react/src/types/props.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { JSX } from 'react'
22

3+
import { type FunctionalAndSemanticColor } from './alpha-tokens'
34
import type {
45
BackgroundSemanticColor,
56
BackgroundTextSemanticColor,
@@ -10,6 +11,8 @@ import type {
1011
ZIndex,
1112
} from './tokens'
1213

14+
type LegacyAndAlphaSemanticColor = SemanticColor | FunctionalAndSemanticColor
15+
1316
/**
1417
* Props for overriding default styles of components. Intended for exceptional use cases where default styles need customization.
1518
*/
@@ -140,7 +143,7 @@ export interface ColorProps {
140143
/**
141144
* Color from the design system's semantic color.
142145
*/
143-
color?: SemanticColor
146+
color?: LegacyAndAlphaSemanticColor
144147
}
145148

146149
/**
@@ -179,7 +182,7 @@ export type AdditionalOverridableStyleProps<ElementName extends PropNameType> =
179182
* Props for adding color properties to named elements within a component.
180183
*/
181184
export type AdditionalColorProps<ElementName extends PropNameType> =
182-
AdditionalProps<ElementName, 'color', SemanticColor>
185+
AdditionalProps<ElementName, 'color', LegacyAndAlphaSemanticColor>
183186

184187
/**
185188
* Props for components that can be activated or deactivated.

0 commit comments

Comments
 (0)