Skip to content

Commit 86057ce

Browse files
committed
Fix inverted dark and light ColorHelper
1 parent 8105fa0 commit 86057ce

File tree

1 file changed

+35
-30
lines changed

1 file changed

+35
-30
lines changed

stories/ColorHelper/ColorDecisionCard.tsx

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function ColorDecisionCard(
3131
className
3232
)}
3333
>
34-
<p>
34+
<div>
3535
<span
3636
style={{
3737
"color": theme.decisions.text.mention.grey.default
@@ -40,8 +40,8 @@ export function ColorDecisionCard(
4040
CSS variable:{" "}
4141
</span>
4242
&nbsp;<code>{colorDecisionName}</code>
43-
</p>
44-
<p>
43+
</div>
44+
<div style={{ "marginTop": fr.spacing("3v") }}>
4545
<span
4646
style={{
4747
"color": theme.decisions.text.mention.grey.default
@@ -70,7 +70,37 @@ export function ColorDecisionCard(
7070
<CopyToClipboardButton
7171
textToCopy={["theme", "decisions", ...themePath].join(".")}
7272
/>
73-
</p>
73+
</div>
74+
75+
<div style={{ "marginTop": fr.spacing("2v") }}>
76+
{typeof colorOption.color === "string" ? (
77+
<>
78+
<span>Colors: </span>: <ColoredSquare hexColorCode={colorOption.color} />
79+
</>
80+
) : (
81+
<>
82+
<span
83+
style={{
84+
"color": theme.decisions.text.mention.grey.default
85+
}}
86+
>
87+
Dark mode:{" "}
88+
</span>
89+
<ColoredSquare hexColorCode={colorOption.color.dark} />
90+
&nbsp; &nbsp;
91+
<span
92+
style={{
93+
"color": theme.decisions.text.mention.grey.default
94+
}}
95+
>
96+
Light mode:{" "}
97+
</span>
98+
<ColoredSquare hexColorCode={colorOption.color.light} />
99+
</>
100+
)}
101+
</div>
102+
103+
{/*
74104
<h6>Corresponding color option:</h6>
75105
<p>
76106
<span
@@ -98,32 +128,7 @@ export function ColorDecisionCard(
98128
theme.options.<strong>{colorOption.themePath.join(".")}</strong>
99129
</code>
100130
</p>
101-
102-
{typeof colorOption.color === "string" ? (
103-
<>
104-
<span>Colors: </span>: <ColoredSquare hexColorCode={colorOption.color} />
105-
</>
106-
) : (
107-
<>
108-
<span
109-
style={{
110-
"color": theme.decisions.text.mention.grey.default
111-
}}
112-
>
113-
Dark mode:{" "}
114-
</span>
115-
<ColoredSquare hexColorCode={colorOption.color.light} />
116-
&nbsp; &nbsp;
117-
<span
118-
style={{
119-
"color": theme.decisions.text.mention.grey.default
120-
}}
121-
>
122-
Light mode:{" "}
123-
</span>
124-
<ColoredSquare hexColorCode={colorOption.color.dark} />
125-
</>
126-
)}
131+
*/}
127132
</div>
128133
);
129134
}

0 commit comments

Comments
 (0)