refactor: tweak table element styles

This commit is contained in:
Carlos Valente
2024-12-20 09:27:49 +01:00
committed by Carlos Valente
parent fb38d82855
commit ab6765b332
6 changed files with 29 additions and 16 deletions
@@ -8,7 +8,9 @@ interface MultiLineCellProps {
handleUpdate: (newValue: string) => void;
}
const MultiLineCell = (props: MultiLineCellProps) => {
export default memo(MultiLineCell);
function MultiLineCell(props: MultiLineCellProps) {
const { initialValue, handleUpdate } = props;
const ref = useRef<HTMLInputElement | null>(null);
const submitCallback = useCallback((newValue: string) => handleUpdate(newValue), [handleUpdate]);
@@ -22,8 +24,12 @@ const MultiLineCell = (props: MultiLineCellProps) => {
inputref={ref}
rows={1}
size='sm'
padding={0}
fontSize='1rem'
style={{
minHeight: '2rem',
padding: '0',
paddingTop: '0.25rem',
fontSize: '1rem',
}}
transition='none'
variant='ontime-transparent'
value={value}
@@ -33,6 +39,4 @@ const MultiLineCell = (props: MultiLineCellProps) => {
spellCheck={false}
/>
);
};
export default memo(MultiLineCell);
}