import React from 'react'; import cx from 'classnames'; import { Paragraph } from 'app/shared/components/text/text'; export interface Props { active: boolean; label?: string; disabled?: boolean; onToggle: (activeState: boolean) => void; } const ToggleButton = ({ active, disabled = false, label = '', onToggle }: Props) => { const handleToggle = () => { if (onToggle && !disabled) { onToggle(!active); } }; const className = cx('c-toggle-button', { 'c-toggle-button--active': active }); const classNameWrapper = cx('c-toggle-button__wrapper', { 'c-toggle-button__wrapper--active': active && !disabled }); return