-
-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
website: add website/public/bundle.html
- Loading branch information
1 parent
1a620ef
commit 0c6a648
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<script src="https://unpkg.com/@babel/[email protected]/babel.min.js" crossorigin></script> | ||
<script src="https://unpkg.com/[email protected]/umd/react.development.js" crossorigin></script> | ||
<script src="https://unpkg.com/[email protected]/umd/react-dom.development.js" crossorigin></script> | ||
<script src="https://unpkg.com/@uiw/codepen-require-polyfill/index.js" crossorigin></script> | ||
</head> | ||
<body> | ||
<div id="container" style="padding: 24px"></div> | ||
<script src="https://unpkg.com/@uiw/react-color/dist/color.min.js"></script> | ||
<script type="text/babel"> | ||
import { Slider, Sketch, Material, Colorful, Compact, Circle, Wheel, Block, Github, Chrome } from '@uiw/react-color'; | ||
|
||
|
||
function Demo() { | ||
const [hsva, setHsva] = React.useState({ h: 214, s: 43, v: 90, a: 1 }); | ||
return ( | ||
<div style={{ display: 'flex' }}> | ||
<Sketch | ||
style={{ marginLeft: 20 }} | ||
color={hsva} | ||
onChange={(color) => { | ||
setHsva({ ...hsva, ...color.hsva }); | ||
}} | ||
/> | ||
<Colorful | ||
style={{ marginLeft: 20 }} | ||
color={hsva} | ||
onChange={(color) => { | ||
setHsva({ ...hsva, ...color.hsva }); | ||
}} | ||
/> | ||
</div> | ||
); | ||
} | ||
|
||
ReactDOM.render(<Demo />, document.getElementById('container')); | ||
</script> | ||
</body> | ||
</html> |