Skip to content

Commit

Permalink
update stories with color.hex
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzuo committed Dec 25, 2020
1 parent a88bde0 commit 520b11c
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions stories/InputColor.stories.js
Expand Up @@ -17,16 +17,22 @@ export const Demo = () => {

return (
<div>
<div
<pre
style={{
marginBottom: 20,
backgroundColor: color.hex,
}}
>
{JSON.stringify(color, null, 2)}
</pre>
<pre
style={{
width: 50,
height: 50,
marginBottom: 20,
backgroundColor: color.rgba,
}}
>
{color.rgba}
</div>
{JSON.stringify(color, null, 2)}
</pre>
<input
type="color"
value={color.hex}
Expand All @@ -48,16 +54,22 @@ export const Alpha = () => {

return (
<div>
<div
<pre
style={{
marginBottom: 20,
backgroundColor: color.hex,
}}
>
{JSON.stringify(color, null, 2)}
</pre>
<pre
style={{
width: 50,
height: 50,
marginBottom: 20,
backgroundColor: color.rgba,
}}
>
{color.rgba}
</div>
{JSON.stringify(color, null, 2)}
</pre>
<InputColor initialValue="#5e72e412" onChange={handleChange} />
</div>
);
Expand Down

0 comments on commit 520b11c

Please sign in to comment.