From ee8539a9351374a719c9026f85d85e7b4ea6e8f5 Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Sat, 25 Sep 2021 16:11:31 +0200 Subject: chore: move tweaks to separate subfolder --- components/Tweaks/EnableSection.tsx | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 components/Tweaks/EnableSection.tsx (limited to 'components/Tweaks/EnableSection.tsx') diff --git a/components/Tweaks/EnableSection.tsx b/components/Tweaks/EnableSection.tsx new file mode 100644 index 0000000..b7981b3 --- /dev/null +++ b/components/Tweaks/EnableSection.tsx @@ -0,0 +1,31 @@ +import { Text, Box, Collapse, Switch } from '@chakra-ui/react' +import React from 'react' +import { InfoTooltip } from './InfoTooltip' + +export interface EnableSectionProps { + label: string + value: boolean | number + onChange: () => void + infoText?: string + children: React.ReactNode +} + +export const EnableSection = (props: EnableSectionProps) => { + const { value, onChange, label, infoText, children } = props + return ( + + + + {label} + {infoText && } + + + + + + {children} + + + + ) +} -- cgit v1.2.3