-
Notifications
You must be signed in to change notification settings - Fork 2.9k
docs(react-switch): cleanup stories & docs #23217
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "none", | ||
| "comment": "cleanup stories & docs", | ||
| "packageName": "@fluentui/react-switch", | ||
| "email": "olfedias@microsoft.com", | ||
| "dependentChangeType": "none" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,6 @@ export { Disabled } from './SwitchDisabled.stories'; | |
| export { Label } from './SwitchLabel.stories'; | ||
| export { LabelWrapping } from './SwitchLabelWrapping.stories'; | ||
| export { Required } from './SwitchRequired.stories'; | ||
| export { Themed } from './SwitchThemed.stories'; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The same was done for |
||
|
|
||
| export default { | ||
| title: 'Components/Switch', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,15 @@ | ||
| ## Best practices | ||
| <details> | ||
| <summary> | ||
| Best Practices | ||
| </summary> | ||
|
|
||
| ### Do | ||
| ### Layout | ||
|
|
||
| ### Don't | ||
| - When people need to perform extra steps for changes to take effect, use a check box instead. For example, if they must click a "Submit", "Next", or "OK" button to apply changes, use a check box. | ||
|
|
||
| ### Content | ||
|
|
||
| - Only replace the On/Off labels if there are more specific labels for the setting. For example, you might use Show/Hide if the setting is "Show images". | ||
| - Keep descriptive text short and concise—two to four words; preferably nouns. For example, "Focused inbox" or "WiFi". | ||
|
|
||
| </details> | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added best practices & component description, took it from existing docs (https://developer.microsoft.com/en-us/fluentui#/controls/web/toggle). We will probably need to follow up on it to cleanup, but it's better than we have currently: |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| A switch represents a physical switch that allows someone to choose between two mutually exclusive options. For example, "On/Off" and "Show/Hide". Choosing an option should produce an immediate result. |
This file was deleted.


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.
As we have own definition we need to exclude existing ones for
checked&defaultChecked. It also solves problem with the description for props.Before
After