UNPKG

@hypothesis/frontend-shared

Version:

Shared components, styles and utilities for Hypothesis projects

41 lines 1.32 kB
var _jsxFileName = "/home/runner/work/frontend-shared/frontend-shared/src/pattern-library/examples/radio-group-aria-label.tsx"; import { useState } from 'preact/hooks'; import RadioGroup from '../../components/input/RadioGroup'; import { jsxDEV as _jsxDEV } from "preact/jsx-dev-runtime"; export default function App() { const [value, setValue] = useState('one'); return _jsxDEV("div", { className: "w-full", children: _jsxDEV(RadioGroup, { "aria-label": "Items labeled with aria-label", selected: value, onChange: setValue, children: [_jsxDEV(RadioGroup.Radio, { value: "one", subtitle: "This is the first item", children: "First" }, void 0, false, { fileName: _jsxFileName, lineNumber: 15, columnNumber: 9 }, this), _jsxDEV(RadioGroup.Radio, { value: "two", subtitle: "This is the second item", children: "Second" }, void 0, false, { fileName: _jsxFileName, lineNumber: 18, columnNumber: 9 }, this)] }, void 0, true, { fileName: _jsxFileName, lineNumber: 10, columnNumber: 7 }, this) }, void 0, false, { fileName: _jsxFileName, lineNumber: 9, columnNumber: 5 }, this); } //# sourceMappingURL=radio-group-aria-label.js.map