(props: ColorWheelProps)
| 12 | export type ColorWheelProps = Omit<AriaColorWheelProps, 'outerRadius' | 'innerRadius'>; |
| 13 | |
| 14 | export function ColorWheel(props: ColorWheelProps) { |
| 15 | // useColorWheelState manages the hue value behind the circular gradient track. |
| 16 | let state = useColorWheelState(props); |
| 17 | let inputRef = useRef<HTMLInputElement>(null); |
| 18 | /*- begin highlight -*/ |
| 19 | let {trackProps, thumbProps, inputProps} = useColorWheel( |
| 20 | {...props, outerRadius: RADIUS, innerRadius: RADIUS - TRACK_THICKNESS}, |
| 21 | state, |
| 22 | inputRef |
| 23 | ); |
| 24 | /*- end highlight -*/ |
| 25 | let {focusProps, isFocusVisible} = useFocusRing(); |
| 26 | |
| 27 | return ( |
| 28 | <div |
| 29 | className="react-aria-ColorWheel" |
| 30 | data-disabled={state.isDisabled || undefined} |
| 31 | style={{position: 'relative', display: 'inline-block'}}> |
| 32 | <div {...trackProps} className="react-aria-ColorWheelTrack" style={trackProps.style} /> |
| 33 | <div |
| 34 | {...thumbProps} |
| 35 | className="react-aria-ColorThumb" |
| 36 | data-focus-visible={isFocusVisible || undefined} |
| 37 | data-disabled={state.isDisabled || undefined} |
| 38 | style={{ |
| 39 | ...thumbProps.style, |
| 40 | background: state.getDisplayColor().toString('css') |
| 41 | }}> |
| 42 | <input ref={inputRef} {...inputProps} {...focusProps} /> |
| 43 | </div> |
| 44 | </div> |
| 45 | ); |
| 46 | } |
nothing calls this directly
no test coverage detected