Skip to content

Commit

Permalink
Add Readme file to ui-action component
Browse files Browse the repository at this point in the history
  • Loading branch information
machadoum committed Dec 14, 2022
1 parent 39f8ca1 commit 98ae5ee
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/plugins/ui_actions/public/cell_actions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
This package provides a uniform interface for displaying UI actions for a cell.
For the `CellActions` component to work, it must be wrapped by `CellActionsContextProvider`. Ideally, the wrapper should stay on the top of the rendering tree.

Example:
```JSX
<CellActionsContextProvider
// call uiActions.getTriggerCompatibleActions(triggerId, data)
getCompatibleActions={getCompatibleActions}>
...
<CellActions mode={CellActionsMode.HOVER_POPOVER} triggerId={MY_TRIGGER_ID} config={{ field: 'fieldName', value: 'fieldValue', fieldType: 'text' }}>
Hover me
</CellActions>
</CellActionsContextProvider>

```

`CellActions` component will display all compatible actions registered for the trigger id.

0 comments on commit 98ae5ee

Please sign in to comment.