File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
packages/page-primitives/src Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import type { ThemeStyle } from "@courselit/page-models";
88
99export interface BadgeProps extends Omit < ShadcnBadgeProps , "variant" > {
1010 theme ?: ThemeStyle ;
11- style ?: React . CSSProperties ;
11+ style ?: Record < string , string > ;
1212 variant ?: "default" | "secondary" | "destructive" | "outline" ;
1313}
1414
@@ -46,11 +46,8 @@ export const Badge: React.FC<BadgeProps> = ({
4646 style = { {
4747 ...style ,
4848 backgroundColor :
49- ( style as React . CSSProperties ) . backgroundColor ||
50- theme ?. colors ?. secondary ,
51- color :
52- ( style as React . CSSProperties ) . color ||
53- theme ?. colors ?. buttonText ,
49+ style . backgroundColor || theme ?. colors ?. secondary ,
50+ color : style . color || theme ?. colors ?. buttonText ,
5451 borderColor : theme ?. colors ?. border ,
5552 } }
5653 { ...props }
You can’t perform that action at this time.
0 commit comments