UNPKG

@hypothesis/frontend-shared

Version:

Shared components, styles and utilities for Hypothesis projects

67 lines 2.07 kB
var _jsxFileName = "/home/runner/work/frontend-shared/frontend-shared/src/pattern-library/examples/radio-group-horizontal.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(); return _jsxDEV("div", { className: "w-full flex flex-col gap-3", children: [_jsxDEV("div", { children: ["Currently selected value: ", value ? _jsxDEV("b", { children: value }, void 0, false, { fileName: _jsxFileName, lineNumber: 11, columnNumber: 44 }, this) : _jsxDEV("i", { children: "none" }, void 0, false, { fileName: _jsxFileName, lineNumber: 11, columnNumber: 61 }, this)] }, void 0, true, { fileName: _jsxFileName, lineNumber: 10, columnNumber: 7 }, this), _jsxDEV(RadioGroup, { "aria-label": "Items", selected: value, onChange: setValue, children: [_jsxDEV(RadioGroup.Radio, { value: "one", subtitle: "This is the first item", children: "First" }, void 0, false, { fileName: _jsxFileName, lineNumber: 14, columnNumber: 9 }, this), _jsxDEV(RadioGroup.Radio, { value: "two", subtitle: "This is the second item", children: "Second" }, void 0, false, { fileName: _jsxFileName, lineNumber: 17, columnNumber: 9 }, this), _jsxDEV(RadioGroup.Radio, { value: "three", subtitle: "This is the third item", children: "Third" }, void 0, false, { fileName: _jsxFileName, lineNumber: 20, columnNumber: 9 }, this)] }, void 0, true, { fileName: _jsxFileName, lineNumber: 13, columnNumber: 7 }, this)] }, void 0, true, { fileName: _jsxFileName, lineNumber: 9, columnNumber: 5 }, this); } //# sourceMappingURL=radio-group-horizontal.js.map