UNPKG

@datalayer/primer-rjsf

Version:

React JSON Schema Form (RJSF) for Primer

13 lines (12 loc) 593 B
import { jsx as _jsx } from "react/jsx-runtime"; import { Box, Button } from "@primer/react"; import { getSubmitButtonOptions, } from "@rjsf/utils"; /** The `SubmitButton` renders a button that represent the `Submit` action on a form */ export default function SubmitButton({ uiSchema }) { const { submitText, norender, props: submitButtonProps = {}, } = getSubmitButtonOptions(uiSchema); if (norender) { return null; } return (_jsx(Box, { marginTop: 2, children: _jsx(Button, { type: "submit", variant: "primary", ...submitButtonProps, children: submitText }) })); }