/**
* @dds-tokens
* recipe: radioGroup
* variantProps: variant, size
* figmaPropToRecipeProp:
* Checked: checked
* State: state
*/
import figma from '@figma/code-connect';
import * as RadioGroup from './RadioGroup';
// Original designer-built component — .Radio Group Radio Toggle (38:8893)
// Variants: Checked(False/True) × State(Default/Focus/Disabled)
// This is the component used in production Discourser.AI page designs.
//
// Anatomy:
//
//
//
// Label
//
//
//
// Key props on Root:
// value — controlled selected value (string)
// defaultValue — uncontrolled initial value (string)
// onValueChange — callback ({ value }: { value: string }) => void
// disabled — boolean, disables all items
// orientation — 'horizontal' | 'vertical' (default: 'vertical')
//
// Key props on Item:
// value — required unique string for this option
// disabled — boolean, disables this item only
figma.connect(
RadioGroup.Root,
'https://www.figma.com/design/GaHmFfmvO4loUzuZS4TgEz/Discourser.AI--V1?node-id=38-8893',
{
props: {
checked: figma.enum('Checked', {
False: false,
True: true,
}),
},
example: ({ checked: _checked }) => (
Option 1
Option 2
Option 3
),
},
);