TagFormModal
TagFormModal
is a React component that displays a modal form that can be used to create a new tag or update an existing tag. The form works in the "create" or "update" mode depending on its properties.
"Create" mode
"Update" mode
Usage
<TagFormModal/>
<TagFormModal
tag={{
id: 'ea837e28-509b-4b6a-a600-d54b6aa0b1f5',
name: 'Existing tag'
}}
/>
Properties
onClose
: function
onClose
: functionCallback. Triggered when the modal form is closed, for example, after clicking the "Cancel" button or after successful tag creation or update.
onCreate
: function
onCreate
: functionCallback. Triggered after successful tag creation or update.
tag
: object
tag
: objectContains two fields:
id
- the ID of an existing tag those name you want to change.name
- the old tag name to display in the prompt.
Updated 5 days ago