Commit 3f0e4d5 1 parent 5359e5f commit 3f0e4d5 Copy full SHA for 3f0e4d5
File tree 3 files changed +53
-7
lines changed
packages/ui-next/src/components/modules/arcade
3 files changed +53
-7
lines changed Original file line number Diff line number Diff line change @@ -36,28 +36,47 @@ export const ArcadeDiscoveryEvent = ({
36
36
Icon,
37
37
achievement,
38
38
variant,
39
+ className,
39
40
} : ArcadeDiscoveryEventProps ) => {
40
41
return (
41
- < div className = { cn ( arcadeDiscoveryEventVariants ( { variant } ) ) } >
42
+ < div className = { cn ( arcadeDiscoveryEventVariants ( { variant } ) , className ) } >
42
43
< div className = "flex items-center gap-x-1.5" >
43
44
{ Icon ? Icon : < SpaceInvaderIcon size = "sm" variant = "solid" /> }
44
45
< CardTitle className = "text-sm font-normal tracking-normal text-foreground-100" >
45
46
{ name }
46
47
</ CardTitle >
47
48
{ achievement && (
48
- < AchievementEvent title = { achievement . title } icon = { achievement . icon } />
49
+ < AchievementEvent
50
+ title = { achievement . title }
51
+ icon = { achievement . icon }
52
+ className = { className }
53
+ />
49
54
) }
50
55
</ div >
51
56
< Timestamp timestamp = { timestamp } />
52
57
</ div >
53
58
) ;
54
59
} ;
55
60
56
- const AchievementEvent = ( { title, icon } : { title : string ; icon : string } ) => {
61
+ const AchievementEvent = ( {
62
+ title,
63
+ icon,
64
+ className,
65
+ } : {
66
+ title : string ;
67
+ icon : string ;
68
+ className ?: string ;
69
+ } ) => {
57
70
return (
58
- < div className = "flex items-center gap-x-1.5" >
71
+ < div
72
+ data-theme
73
+ className = { cn (
74
+ "flex items-center gap-x-1.5 data-[theme=true]:text-primary" ,
75
+ className ,
76
+ ) }
77
+ >
59
78
< p className = "text-xs text-foreground-300" > earned</ p >
60
- < div className = "flex items-center gap-1 p-1 text-primary border-background-400 border rounded-sm" >
79
+ < div className = "flex items-center gap-1 p-1 border-background-400 border rounded-sm" >
61
80
< div className = { cn ( icon , "fa-solid w-3 h-3" ) } />
62
81
< p className = "text-xs" > { title } </ p >
63
82
</ div >
Original file line number Diff line number Diff line change @@ -55,3 +55,24 @@ export default meta;
55
55
type Story = StoryObj < typeof ArcadeDiscoveryGroup > ;
56
56
57
57
export const Default : Story = { } ;
58
+
59
+ export const MultiColors : Story = {
60
+ render : ( args ) => {
61
+ return (
62
+ < div className = "flex flex-col gap-4" >
63
+ < div className = "rounded-lg overflow-hidden" >
64
+ < ArcadeDiscoveryGroup
65
+ { ...args }
66
+ className = "data-[theme=true]:text-[#ff00ff]"
67
+ />
68
+ </ div >
69
+ < div className = "rounded-lg overflow-hidden" >
70
+ < ArcadeDiscoveryGroup
71
+ { ...args }
72
+ className = "data-[theme=true]:text-[#00ff00]"
73
+ />
74
+ </ div >
75
+ </ div >
76
+ ) ;
77
+ } ,
78
+ } ;
Original file line number Diff line number Diff line change @@ -35,12 +35,18 @@ export const ArcadeDiscoveryGroup = ({
35
35
game,
36
36
events,
37
37
variant,
38
+ className,
38
39
} : ArcadeDiscoveryGroupProps ) => {
39
40
return (
40
- < div className = { cn ( arcadeDiscoveryGroupVariants ( { variant } ) ) } >
41
+ < div className = { cn ( arcadeDiscoveryGroupVariants ( { variant } ) , className ) } >
41
42
< ArcadeGameHeader variant = { variant } { ...game } />
42
43
{ events . map ( ( event , index ) => (
43
- < ArcadeDiscoveryEvent key = { index } variant = { variant } { ...event } />
44
+ < ArcadeDiscoveryEvent
45
+ key = { index }
46
+ className = { className }
47
+ variant = { variant }
48
+ { ...event }
49
+ />
44
50
) ) }
45
51
</ div >
46
52
) ;
You can’t perform that action at this time.
0 commit comments