-
Notifications
You must be signed in to change notification settings - Fork 734
Update button docs #3668
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
Update button docs #3668
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 |
---|---|---|
|
@@ -135,7 +135,7 @@ | |
{ | ||
"name": "enableShadow", | ||
"type": "boolean", | ||
"description": "Control shadow visibility (iOS-only)" | ||
"description": "Control shadow visibility" | ||
}, | ||
{ | ||
"name": "avoidInnerPadding", | ||
|
@@ -164,16 +164,21 @@ | |
} | ||
], | ||
"snippet": [ | ||
"<View flex>", | ||
"<View flex center gap-s5>", | ||
"<Button label={'Press'} backgroundColor={Colors.red30}/>", | ||
"<Button label={'Press'} outline size={Button.sizes.medium}/>", | ||
"<Button label={'Press'} iconSource={Assets.icons.demo.star}/>", | ||
"</View>", | ||
"<View flex bottom>", | ||
"<Button fullWidth label='Full Width Button'/>", | ||
"</View>", | ||
"</View>" | ||
], | ||
"docs": { | ||
"hero": { | ||
"title": "Button", | ||
"description": "A button triggers an event or action.\n\nPrimary buttons that indicate a call to action, are the most prominent. Secondary buttons, which indicate less commonly used actions, should be less prominent than primary buttons, second in hierarchy.\n\nButtons are placed where a user should expect them, i.e. in close proximity to the other elements that the action affects.", | ||
"description": "A button triggers an event or action.\n\nPrimary buttons that indicate a call to action, are the most prominent. Secondary buttons, which indicate less commonly used actions, should be less prominent than primary buttons, second in hierarchy.\n\nButtons are placed where a user should expect them, i.e. in close proximity to the other elements that the action affects.", | ||
"type": "hero", | ||
"layout": "horizontal", | ||
"content": [ | ||
|
@@ -217,15 +222,6 @@ | |
} | ||
] | ||
}, | ||
{ | ||
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. You kept the 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. I think we can keep it, FloatingButton is available in public |
||
"title": "Floating Button", | ||
"description": "The Floating Button is displayed at the bottom of the screen.", | ||
"content": [ | ||
{ | ||
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_types_floatingButton.png" | ||
} | ||
] | ||
}, | ||
{ | ||
"title": "Full-Width Button", | ||
"description": "Full Width buttons are sticky on the bottom of the screens.", | ||
|
@@ -234,15 +230,6 @@ | |
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_types_fullButton.png" | ||
} | ||
] | ||
}, | ||
{ | ||
"title": "Toggle Button", | ||
"description": "Toggle Button are mainly used to toggle between a state, f.e- favorite, like.", | ||
"content": [ | ||
{ | ||
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_types_toggleButtons.png" | ||
} | ||
] | ||
} | ||
], | ||
"title": "Button Types", | ||
|
@@ -309,7 +296,7 @@ | |
] | ||
}, | ||
{ | ||
"title": "Distructive", | ||
"title": "Destructive", | ||
"description": "Used for destructive actions such as Delete and Log out. ", | ||
"content": [ | ||
{ | ||
|
@@ -319,18 +306,6 @@ | |
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_presets_distructiveSecondary.png" | ||
} | ||
] | ||
}, | ||
{ | ||
"title": "Premium", | ||
"description": "Used as a premium upgrade entry point.", | ||
"content": [ | ||
{ | ||
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_presets_premiumPrimary.png" | ||
}, | ||
{ | ||
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_presets_premiumSecondary.png" | ||
} | ||
] | ||
} | ||
], | ||
"title": "", | ||
|
@@ -432,51 +407,6 @@ | |
"description": "", | ||
"name": "Inverted" | ||
}, | ||
{ | ||
"type": "table", | ||
"columns": ["Property", "Primary", "Secondary"], | ||
"items": [ | ||
{ | ||
"title": "Active", | ||
"description": "", | ||
"content": [ | ||
{ | ||
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_states_premiumActivePrimary.png" | ||
}, | ||
{ | ||
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_states_premiumActiveSecondary.png" | ||
} | ||
] | ||
}, | ||
{ | ||
"title": "Loading", | ||
"description": "", | ||
"content": [ | ||
{ | ||
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_states_premiumLoadingPrimary.png" | ||
}, | ||
{ | ||
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_states_premiumLoadingSecondary.png" | ||
} | ||
] | ||
}, | ||
{ | ||
"title": "Disabled", | ||
"content": [ | ||
{ | ||
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_states_premiumDisabledPrimary.png" | ||
}, | ||
{ | ||
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_states_premiumDisabledSecondary.png" | ||
} | ||
], | ||
"description": "" | ||
} | ||
], | ||
"title": "", | ||
"description": "", | ||
"name": "Premium" | ||
}, | ||
{ | ||
"type": "table", | ||
"columns": ["Property", "Component"], | ||
|
@@ -638,39 +568,6 @@ | |
"description": "", | ||
"name": "Main" | ||
}, | ||
{ | ||
"type": "table", | ||
"columns": ["Property", "Primary", "Secondary"], | ||
"items": [ | ||
{ | ||
"title": "Active", | ||
"description": "", | ||
"content": [ | ||
{ | ||
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_iconButton_presets_invertedPrimary.png" | ||
}, | ||
{ | ||
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_iconButton_states_invertedActiveSecondary.png" | ||
} | ||
] | ||
}, | ||
{ | ||
"title": "Disabled", | ||
"description": "", | ||
"content": [ | ||
{ | ||
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_iconButton_states_invertedDisabledPrimary.png" | ||
}, | ||
{ | ||
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_overview_iconButton_states_invertedDisabledSecondary.png" | ||
} | ||
] | ||
} | ||
], | ||
"title": "", | ||
"description": "", | ||
"name": "Inverted" | ||
}, | ||
{ | ||
"type": "section", | ||
"title": "Usage Examples", | ||
|
@@ -700,7 +597,7 @@ | |
] | ||
}, | ||
{ | ||
"title": "Distructive", | ||
"title": "Destructive", | ||
"description": "text style: bodyBold, $textDangerLight", | ||
"content": [ | ||
{ | ||
|
@@ -780,7 +677,7 @@ | |
{ | ||
"type": "section", | ||
"title": "Full-Width Button", | ||
"description": "Full-Width buttons are sticky on the bottom of the screens. They are usually used for primary actions on management screens, e.g. adding a new item to a list.\nThey are great to use on screens with potentially long lists, since they stick to the bottom and are always visible." | ||
"description": "Full-Width buttons are sticky on the bottom of the screens.They are usually used for primary actions on management screens, e.g. adding a new item to a list.\nThey are great to use on screens with potentially long lists, since they stick to the bottom and are always visible." | ||
}, | ||
{ | ||
"type": "table", | ||
|
@@ -796,7 +693,7 @@ | |
] | ||
}, | ||
{ | ||
"title": "Distructive ", | ||
"title": "Destructive ", | ||
"description": "", | ||
"content": [ | ||
{ | ||
|
@@ -879,7 +776,7 @@ | |
}, | ||
{ | ||
"title": "Action text truncation/ellipsis", | ||
"description": "Action text truncation or ellipsis should be avoided at all costs.\nActions should be clear and down to the point. In case the action is complex, consider displaying an explanatory text outside the actual button component. ", | ||
"description": "Action text truncation or ellipsis should be avoided at all costs.\nActions should be clear and down to the point. In case the action is complex, consider displaying an explanatory text outside the actual button component. ", | ||
"content": [ | ||
{ | ||
"value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Button/button_UX_dosDonts_truncation.png" | ||
|
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 should be changes in the
ts
file as well