Skip to content

InlineEdit

InlineEdit

Wrap over the inline edit elements.

jsx
import InlineEdit from 'intergalactic/inline-edit';
<InlineEdit />;
import InlineEdit from 'intergalactic/inline-edit';
<InlineEdit />;

InlineEditProps

& {...}
NameTypeDescription
editablebooleanDetermines which children should be displayed
onEditableChange(editable: boolean, event: React.SyntheticEvent) => void
defaultEditablebooleanDefault value if `editable` property is not provided
onEdit() => voidFired when user clicks on view children, expects `editable` property be switched to `true` value. Note: there not pair callback that expects switch to edit mode, you should be handled by yourself
localestring

InlineEdit.View

All children of InlineEdit.View is displayed when editable property of InlineEdit is set to false. When editable property is set to true, children elements still persist in DOM, but hidden via css opacity.

jsx
import InlineEdit from 'intergalactic/inline-edit';
<InlineEdit.View />;
import InlineEdit from 'intergalactic/inline-edit';
<InlineEdit.View />;

InlineEdit.Edit

All children of InlineEdit.Edit is displayed when editable property of InlineEdit is set to true.

jsx
import InlineEdit from 'intergalactic/inline-edit';
<InlineEdit.Edit />;
import InlineEdit from 'intergalactic/inline-edit';
<InlineEdit.Edit />;

Released under the MIT License.

Released under the MIT License.