ohif-viewer/platform/docs/src/pages/components/LabelShowcase.tsx
Alireza 36813e0c2f
chore: recovery 2 (#5014)
Co-authored-by: Dan Rukas <dan.rukas@gmail.com>
Co-authored-by: Tang Cheng <45505657+tctco@users.noreply.github.com>
2025-06-09 10:58:06 -04:00

27 lines
830 B
TypeScript

import React from 'react';
import { Label } from '../../../../ui-next/src/components/Label/Label';
import { Switch } from '../../../../ui-next/src/components/Switch';
import ShowcaseRow from './ShowcaseRow';
/**
* LabelShowcase pairs a Label with a Switch inline.
*/
export default function LabelShowcase() {
return (
<ShowcaseRow
title="Label"
description="Labels clarify the purpose of controls and improve accessibility."
code={`
<Switch defaultChecked id="preview-switch" />
<Label htmlFor="preview-switch" className="ml-2">
Preview edits before creating
</Label>
`}
>
<div className="flex items-center gap-2">
<Switch defaultChecked id="preview-switch" />
<Label htmlFor="preview-switch">Preview edits before creating</Label>
</div>
</ShowcaseRow>
);
}