/** * Toggle row — a `ToggleControl` card (see `.components-toggle-control` in * style.scss) with a leading icon tile, for a stack of switches that benefit * from a glanceable icon alongside the label (e.g. Sidebar's Sticky/Show on * Mobile rows). Plain `ToggleControl` elsewhere in the admin is untouched — * this only adds the icon slot around it. */ import { ToggleControl } from '@wordpress/components'; import type { LucideIcon } from '../icons'; interface ToggleRowProps { icon: LucideIcon; label: string; help?: string; checked: boolean; onChange: ( checked: boolean ) => void; } export default function ToggleRow( { icon: Icon, label, help, checked, onChange, }: ToggleRowProps ) { return (
); }