import React from 'react'; import PropTypes from 'prop-types'; import Box from '../../../components/ui/box'; import Typography from '../../../components/ui/typography'; import ToggleButton from '../../../components/ui/toggle-button'; import { JustifyContent, TypographyVariant, FONT_WEIGHT, } from '../../../helpers/constants/design-system'; export const Setting = ({ value, setValue, title, description, showToggle = true, }) => { return (
{title} {description}
{showToggle ? (
setValue(!val)} />
) : null}
); }; Setting.propTypes = { value: PropTypes.bool, setValue: PropTypes.func, title: PropTypes.string, description: PropTypes.oneOfType([PropTypes.object, PropTypes.string]), showToggle: PropTypes.bool, };