bottomBar
Description
Optional. Controls the configuration of the bottom toolbar in the editorUsage
bottomBar?: boolean | { items: IToolbarItem[] };
Parameters
The bottomBar can take the next values:
true- enables the bottom toolbarfalse- hides the bottom toolbar- an object with the
itemsarray, where each element is a ToolbarItem and supports the same parameters asitemsin the Toolbar component
Examples
Adding bottom bar to editor
import { Editor } from "@svar-ui/react-editor";
const bottomBar = {
items: [
{ comp: "spacer" },
{ comp: "button", label: "Click me", onClick: () => alert("clicked") },
],
};
function App() {
return <Editor bottomBar={bottomBar} />;
}
The bottom bar will display a spacer followed by a button that triggers an alert when clicked.