+ {options.map((opt) => {
+ switch (opt.id) {
+ case 'rows-layout':
+ return (
+
changeLayoutTo(layoutManager, opt)}
+ >
+
+ {/* eslint-disable-next-line @grafana/no-untranslated-strings */}
+
⌄ .-.-.-.-.-
+
+
+
+ {/* eslint-disable-next-line @grafana/no-untranslated-strings */}
+
⌄ .-.-.-.-.-
+
+
+
+
+
+ );
+ case 'tabs-layout':
+ return (
+
changeLayoutTo(layoutManager, opt)}
+ >
+
+
+ {/* eslint-disable-next-line @grafana/no-untranslated-strings */}
+
-.-.-
+ {/* eslint-disable-next-line @grafana/no-untranslated-strings */}
+
-.-.-
+ {/* eslint-disable-next-line @grafana/no-untranslated-strings */}
+
-.-.-
+
+
+
+
+
+
+
+ );
+ case 'responsive-grid':
+ return (
+
changeLayoutTo(layoutManager, opt)}
+ >
+
+
+
+
+
+
+
+ );
+ case 'custom-grid':
+ default:
+ return (
+
changeLayoutTo(layoutManager, opt)}
+ >
+
+
+ );
}
- }}
- />
+ })}
+
);
}
+interface LayoutRadioButtonProps {
+ label: string;
+ id: string;
+ description: string;
+ isSelected: boolean;
+ onSelect: () => void;
+ children: React.ReactNode;
+}
+
+function LayoutRadioButton({ label, id, description, isSelected, children, onSelect }: LayoutRadioButtonProps) {
+ const styles = useStyles2(getStyles);
+
+ return (
+ // This outer div is just so that the radio dot can be outside the
+ // label (as the RadioButtonDot has a label element and they can't nest)
+