diff --git a/packages/paste-website/src/component-examples/RadioGroupExamples.ts b/packages/paste-website/src/component-examples/RadioGroupExamples.ts index 22a2865e05..6107cc601d 100644 --- a/packages/paste-website/src/component-examples/RadioGroupExamples.ts +++ b/packages/paste-website/src/component-examples/RadioGroupExamples.ts @@ -148,6 +148,55 @@ render( ) `.trim(); +export const suffixExample = ` +const DateRadioGroup = () => { + const [value, setValue] = React.useState('lowest'); + return ( + { + setValue(newValue); + }} + > + + Today + + + Last 15 days + + + Last month + + + Custom Premium + + + ); +}; + +render( + +) +`.trim(); + export const requiredExample = ` const SslRadioGroup = () => { const [value, setValue] = React.useState('on'); diff --git a/packages/paste-website/src/pages/components/checkbox/index.mdx b/packages/paste-website/src/pages/components/checkbox/index.mdx index 82b81fc0b4..a8959af670 100644 --- a/packages/paste-website/src/pages/components/checkbox/index.mdx +++ b/packages/paste-website/src/pages/components/checkbox/index.mdx @@ -8,6 +8,7 @@ export const meta = { import {Checkbox, CheckboxGroup, CheckboxDisclaimer} from '@twilio-paste/checkbox'; import {Box} from '@twilio-paste/box'; +import {Badge} from '@twilio-paste/badge'; import {Text} from '@twilio-paste/text'; import {Paragraph} from '@twilio-paste/paragraph'; import {Anchor} from '@twilio-paste/anchor'; @@ -177,6 +178,31 @@ You can provide additional information about the group with the use of help text `} +### Checkbox with suffix + +You can provide additional information about an individual item by adding a non-string element as a suffix. The suffix can be any non-string element that is not interactive. + + + {` + + Busy New + + + Canceled + + + Completed + + + Queued + +`} + + ### Checkbox Disclaimer diff --git a/packages/paste-website/src/pages/components/radio-group/index.mdx b/packages/paste-website/src/pages/components/radio-group/index.mdx index 929f8d0647..f9417ab069 100644 --- a/packages/paste-website/src/pages/components/radio-group/index.mdx +++ b/packages/paste-website/src/pages/components/radio-group/index.mdx @@ -8,6 +8,7 @@ export const meta = { import {Radio, RadioGroup} from '@twilio-paste/radio-group'; import {Box} from '@twilio-paste/box'; +import {Badge} from '@twilio-paste/badge'; import {useUID} from '@twilio-paste/uid-library'; import {Paragraph} from '@twilio-paste/paragraph'; import {SiteLink} from '../../../components/SiteLink'; @@ -24,6 +25,7 @@ import { uncontrolledRadioGroup, controlledRadioGroup, i18nExample, + suffixExample, } from '../../../component-examples/RadioGroupExamples'; import packageJson from '@twilio-paste/radio-group/package.json'; import ComponentPageLayout from '../../../layouts/ComponentPageLayout'; @@ -137,6 +139,14 @@ Help text appears after the group label but before the first radio option. {defaultExample} +### With suffix + +You can provide additional information about an individual item by adding a non-string element as a suffix. The suffix can be any non-string element that is not interactive. + + + {suffixExample} + + ### Required usage Use the required dot to denote a required field. The required dot appears before the fieldset legend.