summaryrefslogtreecommitdiff
path: root/components/EnableSection.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'components/EnableSection.tsx')
-rw-r--r--components/EnableSection.tsx31
1 files changed, 0 insertions, 31 deletions
diff --git a/components/EnableSection.tsx b/components/EnableSection.tsx
deleted file mode 100644
index b7981b3..0000000
--- a/components/EnableSection.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-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 (
- <Box paddingTop={2} key={label}>
- <Box display="flex" justifyContent="space-between" paddingBottom={2}>
- <Box display="flex" alignItems="center">
- <Text>{label}</Text>
- {infoText && <InfoTooltip infoText={infoText} />}
- </Box>
- <Switch isChecked={!!value} onChange={onChange} />
- </Box>
- <Collapse in={!!value} animateOpacity>
- <Box paddingLeft={4} paddingTop={2} paddingBottom={2}>
- {children}
- </Box>
- </Collapse>
- </Box>
- )
-}