import { JSX, mergeProps } from 'solid-js' import { Alpha, useColorPicker, withColorPicker } from '../_common' import AlphaPointer from './AlphaPointer' export type AlphaPickerProps = { width?: string | number height?: string | number direction?: string pointer?: (props: T) => JSX.Element renderers?: any className?: string style?: Record } export function AlphaPicker(_props: AlphaPickerProps) { const props = mergeProps( { width: '316px', height: '16px', direction: 'horizontal', pointer: AlphaPointer, className: '', }, _props, ) const { colors: currentColors, changeColor } = useColorPicker() const styles: Record = { picker: { position: 'relative', width: props.width, height: props.height, }, alpha: { borderRadius: '2px', ...props.style, }, } return (
) } export default withColorPicker(AlphaPicker)