|
10 | 10 | * governing permissions and limitations under the License.
|
11 | 11 | */
|
12 | 12 |
|
13 |
| -import {AriaCheckboxGroupProps, AriaCheckboxProps} from '@react-types/checkbox'; |
| 13 | +import {AriaCheckboxGroupItemProps, AriaCheckboxGroupProps} from '@react-types/checkbox'; |
14 | 14 | import {CheckboxGroupState, useCheckboxGroupState} from '@react-stately/checkbox';
|
15 | 15 | import React, {useRef} from 'react';
|
16 | 16 | import {render} from '@testing-library/react';
|
17 | 17 | import {useCheckboxGroup, useCheckboxGroupItem} from '../';
|
18 | 18 | import userEvent from '@testing-library/user-event';
|
19 | 19 |
|
20 |
| -function Checkbox({checkboxGroupState, ...props}: AriaCheckboxProps & { checkboxGroupState: CheckboxGroupState }) { |
| 20 | +function Checkbox({checkboxGroupState, ...props}: AriaCheckboxGroupItemProps & { checkboxGroupState: CheckboxGroupState }) { |
21 | 21 | const ref = useRef<HTMLInputElement>();
|
22 | 22 | const {children} = props;
|
23 | 23 | const {inputProps} = useCheckboxGroupItem(props, checkboxGroupState, ref);
|
24 | 24 | return <label>{children}<input ref={ref} {...inputProps} /></label>;
|
25 | 25 | }
|
26 | 26 |
|
27 |
| -function CheckboxGroup({groupProps, checkboxProps}: {groupProps: AriaCheckboxGroupProps, checkboxProps: AriaCheckboxProps[]}) { |
| 27 | +function CheckboxGroup({groupProps, checkboxProps}: {groupProps: AriaCheckboxGroupProps, checkboxProps: AriaCheckboxGroupItemProps[]}) { |
28 | 28 | const state = useCheckboxGroupState(groupProps);
|
29 | 29 | const {groupProps: checkboxGroupProps, labelProps} = useCheckboxGroup(groupProps, state);
|
30 | 30 | return (
|
|
0 commit comments