add functions to download uml in two formats

pull/3395/head
Joseph Izang 2 years ago
parent 741c609dae
commit eeca72360e
  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'
export default function UmlDownload() {
const downloadAsPng = () => {
// convert serialized svg to png and download
}
const downloadAsPdf = () => {
// convert serialized svg to pdf and download
}
return(
<Fragment>
<Dropdown>
<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.Menu>
<Dropdown.Item>Download as PNG</Dropdown.Item>
<Dropdown.Item onClick={downloadAsPng}>Download as PNG</Dropdown.Item>
<Dropdown.Divider />
<Dropdown.Item>Download as PDF</Dropdown.Item>
<Dropdown.Item onClick={downloadAsPdf}>Download as PDF</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
</Fragment>

Loading…
Cancel
Save