jsx-slack
Version:
Build JSON object for Slack Block Kit surfaces from JSX
61 lines (60 loc) • 2.04 kB
TypeScript
import { JSXSlack } from '../../jsx';
import { BuiltInComponent } from '../../jsx-internals';
import { ConfirmableProps } from '../composition/Confirm';
import { InputComponentProps } from '../layout/Input';
import { ActionProps, AutoFocusibleProps } from './utils';
interface RadioButtonGroupBaseProps extends ActionProps, AutoFocusibleProps, ConfirmableProps {
children: JSXSlack.ChildNodes;
/**
* A value of the initially selected radio button.
*
* It must choose a string of `value` prop from defined `<RadioButton>`
* elements in children. If not defined, an inital checked button will follow
* the state of `<RadioButton checked>`.
*/
value?: string | null;
}
type RadioButtonGroupProps = InputComponentProps<RadioButtonGroupBaseProps>;
/**
* The interactive component or input component for
* [the `radio_buttons` element](https://api.slack.com/reference/block-kit/block-elements#radio).
*
* Provide the container to choose one of the options supplied by
* `<RadioButton>`.
*
* @example
* ```jsx
* <Home>
* <Section>
* Select the tier of our service:
* <RadioButtonGroup actionId="tier">
* <RadioButton value="free" checked>
* <b>Free</b>
* <small>$0!</small>
* </RadioButton>
* <RadioButton value="standard">
* <b>Standard</b>
* <small>
* $5/month, <b>and 30 days trial!</b>
* </small>
* </RadioButton>
* <RadioButton value="premium">
* <b>Premium</b>
* <small>$30/month</small>
* </RadioButton>
* <RadioButton value="business">
* <b>Business</b>
* <small>
* <i>Please contact to support.</i>
* </small>
* </RadioButton>
* </RadioButtonGroup>
* </Section>
* </Home>
* ```
*
* @return The partial JSON of a block element for the container of radio
* buttons, or `input` layout block with it
*/
export declare const RadioButtonGroup: BuiltInComponent<RadioButtonGroupProps>;
export {};