Uh oh!
There was an error while loading. Please reload this page.
docs(select): add new section on rich content options - #4512
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| const formatInterfaceLabel = (selectInterface) => { | ||
| return selectInterface | ||
| .split('-') | ||
| .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) | ||
| .join(' '); | ||
| }; | ||
| /* Dynamically create the different Select components */ | ||
| const selectInterfaces = ['alert', 'action-sheet', 'modal', 'popover']; |
There was a problem hiding this comment.
Originally I defined the interface array like this:
constselectInterfaces=[{label: 'Alert',value: 'alert',},{label: 'Action Sheet',value: 'action-sheet',},{label: 'Modal',value: 'modal',},{label: 'Popover',value: 'popover',}];but I removed it in favor of using the single string and converting it to the label. If we think this is too much for the demo, I can go back to the object array.
| /* The interfaceOptions property is for demonstration purposes only. */ | ||
| /* It is not required for the rich options to work. */ | ||
| select.interfaceOptions = { | ||
| header: 'Travel mode', | ||
| }; |
There was a problem hiding this comment.
This is just to make the demo look nicer but can be removed if desired.
thetaPC
left a comment
There was a problem hiding this comment.
LGTM, minor suggestions!
Thank you for updating the Playground docs!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Adds the following:
Preview