Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/react-aria-components/src/ColorField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ function useChildren(
slot={props.slot || undefined}
data-channel={props.channel || 'hex'}
data-disabled={props.isDisabled || undefined}
data-invalid={validation.isInvalid || undefined} />
data-invalid={validation.isInvalid || undefined}
data-readonly={props.isReadOnly || undefined}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, these should be added to the useRenderProps above as well, see an example here

isReadOnly: props.isReadOnly || false,

we'll also want to have tests for this which can be modelled after

it('should support read-only state', async () => {

data-required={props.isRequired || undefined} />
</Provider>
);
}