-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Add all Field components to react-field #24426
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
Conversation
…d statusIcon to validationMessageIcon
📊 Bundle size report🤖 This report was generated against ff6eaee1c2f0702585ec8b5d6545e564a0ef5a86 |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit a5d5b04:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: ff6eaee1c2f0702585ec8b5d6545e564a0ef5a86 (build) |
… branch 'master' of https://github.com/microsoft/fluentui into field/implement
…into field/add-all-components
…into field/add-all-components
…ield/add-all-components
It makes the documentation super conufsing because all of the underlying controls also have a primary slot, and both show up in the storybook.
…ield/add-all-components
packages/react-components/react-field/src/stories/InputField/index.stories.tsx
Show resolved
Hide resolved
| @@ -0,0 +1 @@ | |||
| SwitchField adds a Label, validation message, and hint text to the Switch control. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be like CheckboxField where a Label is not mentioned since Switch already has one?
| SwitchField adds a Label, validation message, and hint text to the Switch control. | |
| SwitchField adds a validation message and hint text to the Switch control. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This behavior is pending discussion with design. I'll update it once we decide how SwitchField should work.
| import type { FieldProps } from '../../Field'; | ||
| import { getFieldClassNames, renderField_unstable, useFieldStyles_unstable, useField_unstable } from '../../Field'; | ||
|
|
||
| export type CheckboxFieldProps = Omit<FieldProps<typeof Checkbox>, 'label'> & { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does Switch also need to implement this behavior since it also already has a label prop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm talking to Design about how the label prop of Switch should work. I logged this issue to implement the final behavior once we decide how it should work:
Current Behavior
Only
InputFieldwas added by PR #24394. The rest of the Field components still need to be implemented.New Behavior
Add the following components:
Move most storybook stories directly under Field/*. Each individual component has one Default story to display props and basic example usage.
Related Issue(s)
Spec: