Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move isRequired from LabelableProps to SpectrumLabelableProps #877

Merged
merged 1 commit into from Aug 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions packages/@react-types/shared/src/labelable.d.ts
Expand Up @@ -18,9 +18,7 @@ export type NecessityIndicator = 'icon' | 'label';

export interface LabelableProps {
/** The content to display as the label. */
label?: ReactNode,
/** Whether the label is labeling a required field or group. */
isRequired?: boolean
label?: ReactNode
}

export interface SpectrumLabelableProps extends LabelableProps {
Expand All @@ -38,5 +36,9 @@ export interface SpectrumLabelableProps extends LabelableProps {
* Whether the required state should be shown as an icon or text.
* @default 'icon'
*/
necessityIndicator?: NecessityIndicator
necessityIndicator?: NecessityIndicator,
/**
* Whether the label is labeling a required field or group.
*/
isRequired?: boolean
}