-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #401 from dOrgTech/develop
Merge Develop to Master with Lambda DAO Changes
- Loading branch information
Showing
78 changed files
with
5,496 additions
and
764 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from "react" | ||
import { Box, styled } from "@material-ui/core" | ||
import { ArrowBack } from "@material-ui/icons" | ||
|
||
const BackIcon = styled(ArrowBack)({ | ||
cursor: "pointer", | ||
width: "18px", | ||
color: "#ffff", | ||
marginTop: "-5px" | ||
}) | ||
|
||
export const CloseButton: React.FC<{ onGoBack?: () => void }> = ({ onGoBack }) => { | ||
return ( | ||
<Box onClick={onGoBack}> | ||
<BackIcon /> | ||
</Box> | ||
) | ||
} | ||
|
||
export default CloseButton |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import { Collapse, Grid, IconButton, Typography } from "@material-ui/core" | ||
import { styled } from "@material-ui/styles" | ||
import { ProposalItem } from "modules/explorer/pages/User" | ||
import React, { useState } from "react" | ||
import { Link } from "react-router-dom" | ||
import { Proposal } from "services/indexer/dao/mappers/proposal/types" | ||
import { ContentContainer } from "./ContentContainer" | ||
import KeyboardArrowDownIcon from "@material-ui/icons/KeyboardArrowDown" | ||
import KeyboardArrowUpIcon from "@material-ui/icons/KeyboardArrowUp" | ||
import { ProposalCodeEditorInput } from "./ProposalFormInput" | ||
import Prism, { highlight } from "prismjs" | ||
|
||
const TableContainer = styled(ContentContainer)({ | ||
width: "100%" | ||
}) | ||
|
||
const TableHeader = styled(Grid)({ | ||
padding: "16px 46px", | ||
minHeight: 34 | ||
}) | ||
|
||
const ProposalsFooter = styled(Grid)({ | ||
padding: "16px 46px", | ||
borderTop: ".6px solid rgba(125,140,139, 0.2)", | ||
minHeight: 34 | ||
}) | ||
|
||
interface Props { | ||
code: string | ||
} | ||
|
||
export const CodeCollapse: React.FC<Props> = ({ code }) => { | ||
const [open, setopen] = useState(false) | ||
|
||
return ( | ||
<TableContainer item> | ||
<Grid container direction="column" wrap={"nowrap"}> | ||
<TableHeader item container justifyContent="space-between"> | ||
<Grid item> | ||
<Typography variant="body2" style={{ fontWeight: "500" }} color="textPrimary"> | ||
View Lambda Parameter Code | ||
</Typography> | ||
</Grid> | ||
<Grid item> | ||
<IconButton aria-label="expand row" size="small" onClick={() => setopen(!open)}> | ||
{open ? <KeyboardArrowUpIcon htmlColor="#FFF" /> : <KeyboardArrowDownIcon htmlColor="#FFF" />} | ||
</IconButton> | ||
</Grid> | ||
</TableHeader> | ||
<Grid | ||
item | ||
container | ||
wrap={"nowrap"} | ||
component={Collapse} | ||
in={open} | ||
timeout="auto" | ||
unmountOnExit | ||
direction="column" | ||
> | ||
<ProposalCodeEditorInput | ||
label="" | ||
containerStyle={{ marginTop: "8px" }} | ||
insertSpaces | ||
ignoreTabKey={false} | ||
tabSize={4} | ||
padding={10} | ||
style={{ | ||
minHeight: 500, | ||
fontFamily: "Roboto Mono", | ||
fontSize: 14, | ||
fontWeight: 400, | ||
outlineWidth: 0 | ||
}} | ||
value={code} | ||
onValueChange={code => true} | ||
highlight={code => highlight(code, Prism.languages.javascript, "javascript")} | ||
title={""} | ||
/> | ||
</Grid> | ||
</Grid> | ||
</TableContainer> | ||
) | ||
} |
Oops, something went wrong.