📝 docs: add radio component to the example page
This commit is contained in:
parent
cbc22fe16f
commit
a17d5cfe3d
@ -13,10 +13,13 @@ import {
|
||||
renderTabs,
|
||||
renderVerticalTabs,
|
||||
} from './renders/tabs';
|
||||
import { RADIO_OPTIONS } from './renders/radio';
|
||||
import { Radio } from 'components/shared/Radio';
|
||||
|
||||
const Page = () => {
|
||||
const [singleDate, setSingleDate] = useState<Value>();
|
||||
const [dateRange, setDateRange] = useState<Value>();
|
||||
const [selectedRadio, setSelectedRadio] = useState<string>('');
|
||||
|
||||
return (
|
||||
<div className="relative h-full min-h-full">
|
||||
@ -112,6 +115,27 @@ const Page = () => {
|
||||
<h1 className="text-2xl font-bold">Vertical Tabs</h1>
|
||||
{renderVerticalTabs()}
|
||||
</div>
|
||||
|
||||
<div className="w-full h border border-gray-200 px-20 my-10" />
|
||||
|
||||
{/* Radio */}
|
||||
<div className="flex flex-col gap-10 items-center justify-between">
|
||||
<h1 className="text-2xl font-bold">Radio</h1>
|
||||
<div className="flex gap-20 items-start">
|
||||
<Radio
|
||||
options={RADIO_OPTIONS}
|
||||
orientation="vertical"
|
||||
value={selectedRadio}
|
||||
onValueChange={setSelectedRadio}
|
||||
/>
|
||||
<Radio
|
||||
options={RADIO_OPTIONS}
|
||||
orientation="horizontal"
|
||||
value={selectedRadio}
|
||||
onValueChange={setSelectedRadio}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
16
packages/frontend/src/pages/components/renders/radio.ts
Normal file
16
packages/frontend/src/pages/components/renders/radio.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import { RadioOption } from 'components/shared/Radio';
|
||||
|
||||
export const RADIO_OPTIONS: RadioOption[] = [
|
||||
{
|
||||
label: 'Label 1',
|
||||
value: '1',
|
||||
},
|
||||
{
|
||||
label: 'Label 2',
|
||||
value: '2',
|
||||
},
|
||||
{
|
||||
label: 'Label 3',
|
||||
value: '3',
|
||||
},
|
||||
];
|
Loading…
Reference in New Issue
Block a user