shelving
Version:
Toolkit for using data in JavaScript.
14 lines (13 loc) • 720 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Footer } from "../block/Block.js";
import { Flex } from "../style/Flex.js";
import { FormMessage } from "./FormMessage.js";
import { SubmitButton } from "./SubmitButton.js";
/**
* Show a form footer with custom submit text.
* - Shows an elements row containing a submit button (and any additional buttons provided as `children`).
* - Shows a `<FormMessage>` beneath the buttons that shows any error message set on the form.
*/
export function FormFooter({ children, submit }) {
return (_jsxs(Footer, { children: [_jsxs(Flex, { reverse: true, children: [_jsx(SubmitButton, { children: submit }), children] }), _jsx(FormMessage, {})] }));
}