@deix/mozart-ui
v2.0.4
Published
This repository contains react components to display and edit tables exposed by [mozart](https://github.com/deix-ai/mozart).
Downloads
292
Readme
Mozart UI
This repository contains react components to display and edit tables exposed by mozart.
React components usage
The main component is DBTable
, which can be used by passing mozartURL
and editable
props:
<DBTable
mozartURL='http://localhost:8000/api/db'
dbTable='table_name'
editable
/>
Props
mozartURL
(string): base url where mozart endpoints are reachabledbTable
(string): name of the tablefilterQuery
{ [key: string]: string }: any additional query params to be passed to mozarteditable
boolean: will allow editing the tablesingleSelectColumns
{[key: string]: string[]}: a map where the keys are table columns and the values are a list of selectable optionsnewRowTemplate
: an object containing the default values for a new row
Any additional prop will be passed to the underlying DataGrid.
Usage as a docker image
docker run -d \
-e MOZART_URL=http://localhost:8000/api/db \
-e ENABLE_EDITING=true \
-p 3000:3000 \
quay.io/deix/mozart-ui