diff --git a/src/components/radio-button/radio-button.stories.tsx b/src/components/radio-button/radio-button.stories.tsx index 49fcee0f..4493eed9 100644 --- a/src/components/radio-button/radio-button.stories.tsx +++ b/src/components/radio-button/radio-button.stories.tsx @@ -1,6 +1,6 @@ import React, { useState } from 'react'; import RadioButton, { RadioButtonGroupProps } from './radio-button'; -import { Plus } from 'lucide-react'; +import { AppWindow, ChartNoAxesGantt, House, Infinity, Instagram, LogIn, Map, Newspaper, PanelLeftClose, PictureInPicture, Plus, Share2, UserPlus } from 'lucide-react'; import { Meta, StoryFn } from '@storybook/react'; import Badge from '../badge'; @@ -142,3 +142,225 @@ export const RadioWithBorderSmallSize = RadioWithBorderTemplate.bind( {} ); RadioWithBorderSmallSize.args = { size: 'sm', }; + +const defaultRadioButtonGroupData = [ + { + id: '1', + value: 'analytics', + icon: , + label: 'Login Form', + description: 'Demo', + toggleLabel: 'Enable', + hideSelection: true, + useSwitch: false, + bagde: ( + + ), + }, + { + id: '2', + value: 'notifications', + icon: , + label: 'Registration Form', + description: 'Demo', + toggleLabel: 'Disable', + hideSelection: true, + useSwitch: false, + bagde: ( + + ), + }, + { + id: '3', + value: 'settings', + icon: , + label: 'Instagram Feed', + description: 'Demo', + toggleLabel: 'Settings', + hideSelection: true, + useSwitch: false, + bagde: ( + + ), + }, + { + id: '4', + value: 'security', + icon: , + label: 'Loop Builder', + description: 'Demo', + toggleLabel: 'Security', + hideSelection: true, + useSwitch: false, + bagde: ( + + ), + }, + { + id: '5', + value: 'marketing', + icon: , + label: 'Marketing Button', + description: 'Demo', + toggleLabel: 'Billing', + hideSelection: false, + useSwitch: true, + }, + { + id: '6', + value: 'modal', + icon: , + label: 'Modal', + description: 'Demo', + toggleLabel: 'modal', + hideSelection: false, + useSwitch: true, + }, + { + id: '7', + value: 'socialshare', + icon: , + label: 'Social Share', + description: 'Demo', + toggleLabel: 'socialshare', + hideSelection: false, + useSwitch: true, + }, + { + id: '8', + value: 'Blockquote', + icon: , + label: 'Blockquote', + description: 'Demo', + toggleLabel: 'blockquote', + hideSelection: false, + useSwitch: true, + }, + { + id: '9', + value: 'contenttimeline', + icon: , + label: 'Content Timeline', + description: 'Demo', + toggleLabel: 'contenttimeline', + hideSelection: false, + useSwitch: true, + }, + { + id: '10', + value: 'googlemaps', + icon: , + label: 'Google Maps', + description: 'Demo', + toggleLabel: 'googlemaps', + hideSelection: false, + useSwitch: true, + bagde: ( + + ), + }, + { + id: '11', + value: 'lottieanimation', + icon: , + label: 'Lottie Animation', + description: 'Demo', + toggleLabel: 'lottieanimation', + hideSelection: false, + useSwitch: true, + }, + { + id: '12', + value: 'animations', + icon: , + label: 'Animations', + description: 'Documentation', + toggleLabel: 'animations', + hideSelection: false, + useSwitch: true, + bagde: ( + + ), + }, +]; + +const RadioButtonTileTemplate: StoryFn = () => { + return ( + { + return value; + } } + className="w-full gap-1" + > + { defaultRadioButtonGroupData.map( + ( option ) => ( + + ) + ) } + + ); +}; + +export const RadioButtonTile = RadioButtonTileTemplate.bind( {} ); diff --git a/src/components/radio-button/radio-button.tsx b/src/components/radio-button/radio-button.tsx index b3c02468..5b59b312 100644 --- a/src/components/radio-button/radio-button.tsx +++ b/src/components/radio-button/radio-button.tsx @@ -336,14 +336,17 @@ export const RadioButtonComponent = ( return ( { icon && <>{ icon }> } - +