add components for sol2uml

pull/3395/head
Joseph Izang 2 years ago
parent 1bb733f456
commit 741c609dae
  1. 19
      libs/remix-ui/solidity-uml-gen/src/lib/components/UmlDownload.tsx
  2. 8
      libs/remix-ui/solidity-uml-gen/src/lib/solidity-uml-gen.tsx

@ -0,0 +1,19 @@
import React, { Fragment } from 'react'
import { Dropdown } from 'react-bootstrap'
export default function UmlDownload() {
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>
</Dropdown.Toggle>
<Dropdown.Menu>
<Dropdown.Item>Download as PNG</Dropdown.Item>
<Dropdown.Divider />
<Dropdown.Item>Download as PDF</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
</Fragment>
)
}

@ -1,6 +1,7 @@
import React, { Fragment, useEffect, useState } from 'react'
import { TransformComponent, TransformWrapper } from 'react-zoom-pan-pinch'
import { ThemeSummary } from '../types'
import UmlDownload from './components/UmlDownload'
import './css/solidity-uml-gen.css'
export interface RemixUiSolidityUmlGenProps {
updatedSvg?: string
@ -47,12 +48,7 @@ export function RemixUiSolidityUmlGen ({ updatedSvg, loading }: RemixUiSolidityU
style={{ zIndex: 3, top: "10", right: "2em" }}
>
<div className="py-2 px-2 d-flex justify-content-center align-items-center">
<button
className="btn btn-outline-info d-none rounded-circle mr-2"
onClick={() => resetTransform()}
>
<i className="far fa-arrow-to-bottom align-item-center d-flex justify-content-center"></i>
</button>
<UmlDownload />
<button
className="badge badge-info remixui_no-shadow p-2 rounded-circle mr-2"
onClick={() => zoomIn()}

Loading…
Cancel
Save