feat(frontend): made label optional for toggle groups

pull/85/head
Samuel Rowe 3 years ago
parent 30eada6938
commit 737293517e

@ -5,7 +5,7 @@ import { Button, styled } from "@mui/joy";
export interface IToggleProps { export interface IToggleProps {
name: string; name: string;
label: string; label?: string;
help?: string; help?: string;
options: { options: {
text: string; text: string;
@ -65,7 +65,7 @@ const Toggle: FunctionComponent<IToggleProps> = (
return ( return (
<Root> <Root>
<Label>{label}</Label> {label && <Label>{label}</Label>}
<Buttons> <Buttons>
{options.map((option, index) => ( {options.map((option, index) => (
<Fragment key={option.value}> <Fragment key={option.value}>

Loading…
Cancel
Save