From bfb24f95f0989e7fd19aa846ef030e3e336716e0 Mon Sep 17 00:00:00 2001 From: Ed Sungik Choi Date: Tue, 7 Jan 2025 15:04:29 +0900 Subject: [PATCH] feat(bezier-react): update ColorProps type to support alpha color tokens --- packages/bezier-react/src/types/props.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/bezier-react/src/types/props.ts b/packages/bezier-react/src/types/props.ts index 86cb75e23..e65f5ff5b 100644 --- a/packages/bezier-react/src/types/props.ts +++ b/packages/bezier-react/src/types/props.ts @@ -1,5 +1,6 @@ import type { JSX } from 'react' +import { type FunctionalAndSemanticColor } from './alpha-tokens' import type { BackgroundSemanticColor, BackgroundTextSemanticColor, @@ -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. */ @@ -140,7 +143,7 @@ export interface ColorProps { /** * Color from the design system's semantic color. */ - color?: SemanticColor + color?: LegacyAndAlphaSemanticColor } /** @@ -179,7 +182,7 @@ export type AdditionalOverridableStyleProps = * Props for adding color properties to named elements within a component. */ export type AdditionalColorProps = - AdditionalProps + AdditionalProps /** * Props for components that can be activated or deactivated.