Scaffold Gishen Admin: React/Vite shadcn console with role modules, EN/AM i18n, mocks, and backend spec. Co-authored-by: Cursor <cursoragent@cursor.com>
21 lines
487 B
TypeScript
21 lines
487 B
TypeScript
import { Button } from '@/components/ui/button'
|
|
|
|
export function SwitchRow({
|
|
label,
|
|
enabled,
|
|
onToggle,
|
|
}: {
|
|
label: string
|
|
enabled: boolean
|
|
onToggle: () => void
|
|
}) {
|
|
return (
|
|
<div className="flex items-center justify-between rounded-xl border p-3">
|
|
<span className="text-sm font-medium">{label}</span>
|
|
<Button size="sm" variant={enabled ? 'default' : 'outline'} onClick={onToggle}>
|
|
{enabled ? 'Enabled' : 'Disabled'}
|
|
</Button>
|
|
</div>
|
|
)
|
|
}
|