refactor(web): remove typescript

This commit is contained in:
Ali BARIN
2024-02-27 15:23:23 +00:00
parent 636870a075
commit b3ae2d2748
337 changed files with 2067 additions and 4997 deletions

View File

@@ -0,0 +1,26 @@
import Chip from '@mui/material/Chip';
import { useSelected, useFocused } from 'slate-react';
export default function Variable({ attributes, children, element, disabled }) {
const selected = useSelected();
const focused = useFocused();
const label = (
<>
<span style={{ fontWeight: 500 }}>{element.name}</span>:{' '}
<span style={{ fontWeight: 300 }}>{element.sampleValue}</span>
{children}
</>
);
return (
<Chip
{...attributes}
disabled={disabled}
component="span"
contentEditable={false}
style={{
boxShadow: selected && focused ? '0 0 0 2px #B4D5FF' : 'none',
}}
size="small"
label={label}
/>
);
}