Package Exports
- @uiw/react-color-editable-input-hsla
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@uiw/react-color-editable-input-hsla) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
React Color Editable Input HSLA
EditableInputHSLA Component is a subcomponent of @react-color
.
Install
npm i @uiw/react-color-editable-input-hsla
Usage
import { useState } from 'react';
import { hsvaToHex } from '@uiw/color-convert';
import EditableInputHSLA from '@uiw/react-color-editable-input-hsla';
function Demo() {
const [hsva, setHsva] = useState({ h: 209, s: 36, v: 90, a: 1 });
return (
<div style={{ padding: '0 10px 0 20px' }}>
<EditableInputHSLA
hsva={hsva}
onChange={(color) => {
setHsva({ ...hsva, ...color.hsva });
}}
/>
</div>
);
}
Props
import { EditableInputRGBAProps } from '@uiw/react-color-editable-input-rgba';
interface EditableInputHSLAProps extends Omit<EditableInputRGBAProps, 'rProps' | 'gProps' | 'bProps'> {
hProps?: EditableInputRGBAProps['gProps'];
sProps?: EditableInputRGBAProps['gProps'];
lProps?: EditableInputRGBAProps['gProps'];
aProps?: EditableInputRGBAProps['aProps'];
}
License
Licensed under the MIT License.