import PropTypes from 'prop-types'; import Chip from '@mui/material/Chip'; import { useSelected, useFocused } from 'slate-react'; function Variable({ attributes, children, element, disabled }) { const selected = useSelected(); const focused = useFocused(); const label = ( <> {children} {element.name}:{' '} {element.sampleValue} ); return ( ); } Variable.propTypes = { attributes: PropTypes.object.isRequired, children: PropTypes.node.isRequired, element: PropTypes.shape({ name: PropTypes.string.isRequired, sampleValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]) .isRequired, }), disabled: PropTypes.bool, }; export default Variable;