add functions to download uml in two formats

pull/5370/head
Joseph Izang 2 years ago
parent 7f43c6f297
commit 3d3e6473b8
  1. 15
      libs/remix-ui/solidity-uml-gen/src/lib/components/UmlDownload.tsx

@ -2,16 +2,25 @@ import React, { Fragment } from 'react'
import { Dropdown } from 'react-bootstrap' import { Dropdown } from 'react-bootstrap'
export default function UmlDownload() { export default function UmlDownload() {
const downloadAsPng = () => {
// convert serialized svg to png and download
}
const downloadAsPdf = () => {
// convert serialized svg to pdf and download
}
return( return(
<Fragment> <Fragment>
<Dropdown> <Dropdown>
<Dropdown.Toggle className="badge badge-info remixui_no-shadow p-2 rounded-circle mr-2"> <Dropdown.Toggle className="badge badge-info remixui_no-shadow p-2 rounded-circle mr-2">
<i className="far fa-arrow-to-bottom align-item-center d-flex justify-content-center"></i> <i className="far fa-arrow-to-bottom align-item-center d-flex justify-content-center"></i>
</Dropdown.Toggle> </Dropdown.Toggle>
<Dropdown.Menu> <Dropdown.Menu>
<Dropdown.Item>Download as PNG</Dropdown.Item> <Dropdown.Item onClick={downloadAsPng}>Download as PNG</Dropdown.Item>
<Dropdown.Divider /> <Dropdown.Divider />
<Dropdown.Item>Download as PDF</Dropdown.Item> <Dropdown.Item onClick={downloadAsPdf}>Download as PDF</Dropdown.Item>
</Dropdown.Menu> </Dropdown.Menu>
</Dropdown> </Dropdown>
</Fragment> </Fragment>

Loading…
Cancel
Save