mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
Moved the styles in the styles.less file. Unwrapped the setColor function
This commit is contained in:
parent
bd862fa9cc
commit
8370789211
2 changed files with 8 additions and 4 deletions
|
|
@ -6,13 +6,12 @@ const styles = require('./styles');
|
|||
const ColorPickerExampleusage = () => {
|
||||
const [color, setColor] = React.useState('rgba(166, 196, 213, 0.97)');
|
||||
return (
|
||||
<div style={{ color: 'var(--color-surfacelighter)', padding: '1em' }}>
|
||||
<div className={styles['demo-container']}>
|
||||
<ColorPicker
|
||||
className={styles['color-picker-container']}
|
||||
value={color}
|
||||
onChange={(color) => { setColor(color) }}
|
||||
onChange={setColor}
|
||||
/>
|
||||
<div style={{ marginTop: '1em' }}>Current color is {color}</div>
|
||||
<div className={styles['test-output']}>Current color is {color}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
.demo-container {
|
||||
color: var(--color-surfacelighter);
|
||||
padding: 1rem;
|
||||
.test-output { margin-top: 1rem; }
|
||||
}
|
||||
Loading…
Reference in a new issue