Closed DenisKaminsky closed 1 year ago
@DenisKaminsky Upgrade v1.2.0
import React, { useState } from 'react';
import Sketch from '@uiw/react-color-sketch';
function Demo() {
const [hex, setHex] = useState("#fff");
const [disableAlpha, setDisableAlpha] = useState(false);
return (
<div>
<Sketch
style={{ marginLeft: 20 }}
color={hex}
disableAlpha={disableAlpha}
onChange={(color) => {
setHex(color.hex);
}}
/>
<button onClick={() => setDisableAlpha(!disableAlpha)}>
disableAlpha={disableAlpha.toString()}
</button>
</div>
);
}
export default Demo;
Nice. But it is still visible on the panel Also it would be nice to center the text in these cells. You can add "text-align: center" for these inputs
Thank you
Could you please add an option to disable alpha for Sketch picker? Alpha doesn't make sense if you work with hex codes because it requires an 8 character hex code format instead of 6 character format which is used by default