@knowmax/genericlist-fluentuiv9
Version:
Knowmax Generic list with basic CRUD support with Fluent V9 user interface implementation.
13 lines (12 loc) • 558 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { useCallback } from "react";
import { observer } from "mobx-react-lite";
import { Button } from "@fluentui/react-button";
import { AddRegular } from '@fluentui/react-icons';
/** Renders button to start process to create new item. */
export const CreateItem = observer((props) => {
const create = useCallback(() => {
props.list.create();
}, [props.list]);
return (_jsx(Button, { ...props, icon: props.icon || _jsx(AddRegular, {}), onClick: create, children: props.children }));
});