UNPKG

@seasketch/geoprocessing

Version:

Geoprocessing and reporting framework for SeaSketch 2.0

23 lines 1.03 kB
import React from "react"; import { styled } from "styled-components"; import Toolbar from "./Toolbar.js"; import DataDownload from "./DataDownload.js"; const DataDownloadToolbarStyled = styled.div ` & .gp-data-download-toolbar h2 { flex-grow: 1; } `; /** * Convenience component that creates a Toolbar with Header and DataDownload */ export const DataDownloadToolbar = ({ title, variant = "dense", useGutters = false, filename, formats, data, }) => { const toolbarProps = { title, variant, useGutters }; const downloadProps = { filename, formats, data }; return (React.createElement(DataDownloadToolbarStyled, null, React.createElement(Toolbar, { toolbarCls: "gp-data-download-toolbar", ...toolbarProps }, typeof title === "string" ? React.createElement("h2", null, title) : title, React.createElement("div", null, React.createElement(DataDownload, { ...downloadProps }))))); }; export default DataDownloadToolbar; //# sourceMappingURL=DataDownloadToolbar.js.map