17
apps/builder/src/components/SwitchWithRelatedSettings.tsx
Normal file
17
apps/builder/src/components/SwitchWithRelatedSettings.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import React from 'react'
|
||||
import { SwitchWithLabel, SwitchWithLabelProps } from './inputs/SwitchWithLabel'
|
||||
import { Stack } from '@chakra-ui/react'
|
||||
|
||||
type Props = SwitchWithLabelProps
|
||||
|
||||
export const SwitchWithRelatedSettings = ({ children, ...props }: Props) => (
|
||||
<Stack
|
||||
borderWidth={props.initialValue ? 1 : undefined}
|
||||
rounded="md"
|
||||
p={props.initialValue ? '4' : undefined}
|
||||
spacing={4}
|
||||
>
|
||||
<SwitchWithLabel {...props} />
|
||||
{props.initialValue && children}
|
||||
</Stack>
|
||||
)
|
||||
Reference in New Issue
Block a user