import { PlateElement } from '@udecode/plate-common' import { forwardRef } from 'react' import { u } from '@fizzui/styles' import type { ButtonState } from './plugin' import { button } from './element.css' export const ButtonElement = forwardRef( ( props: React.ComponentPropsWithoutRef, ref: React.ElementRef, ) => { const { href, align, size, square } = props.element as unknown as ButtonState const Comp = href ? 'a' : 'button' return ( {props.children} ) }, )