Feather icons added, use click to copy, scss added to fit in icon + Lora font.

This commit is contained in:
Minesh Mitha 2018-10-08 20:51:09 +01:00
parent 3023b25eb2
commit 5f99629930
9 changed files with 63 additions and 31 deletions

View file

@ -33,10 +33,20 @@
height: 90vh;
}
p.asset-description {
white-space: pre-line;
font-size: 14px;
color: #2E2F31;
letter-spacing: 0;
line-height: 18px;
}
.asset-information-wrap {
max-width: 800px;
p.asset-description {
white-space: pre-line;
font-size: 14px;
color: #2E2F31;
letter-spacing: 0;
line-height: 18px;
}
.asset-information {
width: 320px;
}
}

View file

@ -1,14 +1,24 @@
.click-to-copy {
cursor: pointer;
border: none;
padding: 0.5em;
margin: 0;
color: black;
background-color: white;
width: calc(100% - 1em - 2px);
font-size: 14px;
color: #2E2F31;
letter-spacing: -0.6px;
line-height: 20px;
.click-to-copy-wrap {
display: flex;
width: 100%;
justify-content: space-between;
.click-to-copy {
cursor: pointer;
border: none;
padding: 0.5em;
margin: 0;
color: black;
background-color: white;
width: calc(100% - 1em - 2px);
font-size: 14px;
color: #2E2F31;
letter-spacing: -0.6px;
line-height: 20px;
max-width: 200px;
}
svg {
stroke: $brand-color;
}
}

View file

@ -2,6 +2,7 @@
padding-top: $thin-padding;
padding-bottom: $thin-padding;
display: inline-block;
font-size: 12px;
}
.label-radio {

View file

@ -18,8 +18,8 @@ h3 {
}
p, body, button, input, textarea, label, select, option {
font-family: 'Lekton', monospace;
font-size: $text-large;
font-family: 'Lora', serif;
font-size: 16px;
}
.text--extra-large {

View file

@ -1,4 +1,5 @@
import React from 'react';
import * as Icon from 'react-feather';
class ClickToCopy extends React.Component {
constructor (props) {
@ -18,15 +19,18 @@ class ClickToCopy extends React.Component {
render () {
const {id, value} = this.props;
return (
<input
id={id}
value={value}
onClick={this.copyToClipboard}
type='text'
className='click-to-copy'
readOnly
spellCheck='false'
/>
<div className='click-to-copy-wrap'>
<input
id={id}
value={value}
onClick={this.copyToClipboard}
type='text'
className='click-to-copy'
readOnly
spellCheck='false'
/>
<Icon.Copy />
</div>
);
}
}

View file

@ -125,7 +125,6 @@ class AssetInfo extends React.Component {
}
/>
</div>
);
}

5
package-lock.json generated
View file

@ -11090,6 +11090,11 @@
"prop-types": "15.6.2"
}
},
"react-feather": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/react-feather/-/react-feather-1.1.3.tgz",
"integrity": "sha512-5+KHu7zp5qvc+zq6N0XjeZDhufl3NVEaQyocg486lXZ+ZwW9z66GO+HXABoZ74OCLjsqhBl48j4BS17VRfyjTQ=="
},
"react-ga": {
"version": "2.5.3",
"resolved": "https://registry.npmjs.org/react-ga/-/react-ga-2.5.3.tgz",

View file

@ -64,6 +64,7 @@
"prop-types": "^15.6.2",
"react": "^16.4.2",
"react-dom": "^16.4.2",
"react-feather": "^1.1.3",
"react-ga": "^2.5.3",
"react-helmet": "^5.2.0",
"react-redux": "^5.0.6",

View file

@ -15,6 +15,7 @@ module.exports = (helmet, html, preloadedState) => {
<link rel="stylesheet" href="/bundle/style.css" type="text/css">
<!--google font-->
<link href="https://fonts.googleapis.com/css?family=Roboto:300" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Lora" rel="stylesheet">
</head>
<body>
<div id="react-app">${html}</div>
@ -22,6 +23,7 @@ module.exports = (helmet, html, preloadedState) => {
window.__PRELOADED_STATE__ = ${JSON.stringify(preloadedState).replace(/</g, '\\\u003c')}
</script>
<script src="/bundle/bundle.js"></script>
<script src="/assets/js/feather.min.js"></script>
</body>
</html>
`;