'use client' import classNames from 'classnames' import { useContext } from 'react' import { Link, Text, isAdmin, types } from 'react-bricks/rsc' import { FormBuilderContext } from '../../contacts/FormBuilder/FormBuilderProvider' export interface ButtonProps { type: 'button' | 'link' text: types.TextValue href: string isTargetBlank: boolean buttonType: 'submit' | 'button' | 'reset' buttonColor: { color: string classNameSolid: string classNameOutline: string } variant: 'solid' | 'outline' | 'ghost' padding: 'normal' | 'small' className?: string simpleAnchorLink: boolean disabled: boolean } const Button: React.FC = ({ type, href, isTargetBlank, buttonType, buttonColor, variant, padding, className, simpleAnchorLink = false, text, disabled = false, }) => { const { isSubmitting } = useContext(FormBuilderContext) const target = isTargetBlank ? { target: '_blank', rel: 'noopener noreferrer' } : {} // Button if (type === 'link') { return ( {children}} /> ) } return ( ) } export default Button