Refacto/remaining inplace input cells (#531)
* Add inplace date input component * Add inplace phone input component * Add inplace double text input component * Add inplace chip input component * Remove useless styled component * Reduce code through props destructuring
This commit is contained in:
@ -12,20 +12,12 @@ type OwnProps = {
|
||||
editModeVerticalPosition?: 'over' | 'below';
|
||||
};
|
||||
|
||||
export function EditableCell({
|
||||
editModeHorizontalAlign = 'left',
|
||||
editModeVerticalPosition = 'over',
|
||||
editModeContent,
|
||||
nonEditModeContent,
|
||||
}: OwnProps) {
|
||||
export function EditableCell(props: OwnProps) {
|
||||
const setSoftFocusOnCurrentCell = useSetSoftFocusOnCurrentCell();
|
||||
const hasSoftFocus = useIsSoftFocusOnCurrentCell();
|
||||
return (
|
||||
<InplaceInput
|
||||
editModeHorizontalAlign={editModeHorizontalAlign}
|
||||
editModeVerticalPosition={editModeVerticalPosition}
|
||||
editModeContent={editModeContent}
|
||||
nonEditModeContent={nonEditModeContent}
|
||||
{...props}
|
||||
setSoftFocusOnCurrentInplaceInput={setSoftFocusOnCurrentCell}
|
||||
hasSoftFocus={!!hasSoftFocus}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user