Skip to content

Commit 7eaf37a

Browse files
authored
chore: add a video in readme (#40)
1 parent ed4aa76 commit 7eaf37a

File tree

4 files changed

+28
-13
lines changed

4 files changed

+28
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
> Collections of color components for `material-ui`. No dependencies, small, highly customizable and theming support !
2121
22-
![Storybook](./images/wip.png)
22+
![Video of ColorPicker](./images/muicc-v0-2.webp)
2323

2424
## Why another ColorPicker ?
2525

images/muicc-v0-2.webp

252 KB
Loading

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,7 @@
9191
"^.+\\.mdx$": "@storybook/addon-docs/jest-transform-mdx"
9292
},
9393
"coverageReporters": [
94-
"text",
95-
"html",
96-
"lcov"
94+
"json", "lcov", "text", "clover", "html"
9795
],
9896
"moduleFileExtensions": [
9997
"js",

stories/ColorPicker.stories.js

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/* eslint-disable import/no-extraneous-dependencies */
44
import React, { useState } from 'react';
55
import { action } from '@storybook/addon-actions';
6+
import Button from '@material-ui/core/Button';
67
import { ColorPicker } from '../src';
78

89
const paletteObj = {
@@ -34,7 +35,7 @@ Basic.story = {
3435
};
3536

3637
export const Palette = () => (
37-
<div style={style}>
38+
<div>
3839
<ColorPicker defaultValue="transparent" palette={paletteObj} />
3940
</div>
4041
);
@@ -59,18 +60,34 @@ const Controller = ({ value }) => {
5960
action('changed')(newValue);
6061
};
6162
return (
62-
<div style={style}>
63-
<ColorPicker value={color} onChange={handleChange} />
64-
<button onClick={() => handleChange('rgb(255, 0, 0)')}>set rgb(255, 0, 0)</button>
63+
<div style={{ display: 'flex', flexDirection: 'row' }}>
64+
<div>
65+
<div style={{ marginLeft: '-28px', marginTop: '-8px', paddingBottom: '28px', color: '#777', fontSize: '10px' }}>
66+
<h1>material-ui-color-components</h1>
67+
<h2>ColorPicker example</h2>
68+
</div>
69+
<ColorPicker value={color} palette={paletteObj} onChange={handleChange} />
70+
<Button variant="outlined" style={{ marginTop: '100px' }} onClick={() => handleChange('rgb(255, 0, 0)')}>
71+
set rgb(255, 0, 0)
72+
</Button>
73+
<div style={{ paddingTop: '180px', marginLeft: '-28px', color: '#999', fontSize: '12px' }}>
74+
https://github.com/mikbry/material-ui-color-components
75+
</div>
76+
</div>
77+
<div
78+
style={{
79+
color: '#777',
80+
marginLeft: '24px',
81+
width: '400px',
82+
height: '480px',
83+
backgroundColor: color.hex ? `#${color.hex}` : color,
84+
}}
85+
/>
6586
</div>
6687
);
6788
};
6889

69-
export const Controlled = () => (
70-
<div style={style}>
71-
<Controller value="#fff" />
72-
</div>
73-
);
90+
export const Controlled = () => <Controller value="#0fe" />;
7491
Controlled.story = {
7592
parameters: { defaultValue: 'red', palette: paletteObj, deferred: true },
7693
};

0 commit comments

Comments
 (0)