Skip to content

Commit 9918183

Browse files
committed
add styles for instruction text
1 parent 6aa97a0 commit 9918183

File tree

4 files changed

+160
-6
lines changed

4 files changed

+160
-6
lines changed

.babelrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"presets": ["env", "react"],
3-
"plugins": ["transform-class-properties"]
3+
"plugins": ["transform-class-properties", "babel-plugin-styled-components"]
44
}

package-lock.json

+145-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"babel-core": "^6.26.3",
5050
"babel-eslint": "^10.0.1",
5151
"babel-jest": "^23.6.0",
52+
"babel-plugin-styled-components": "^1.8.0",
5253
"babel-plugin-transform-class-properties": "^6.24.1",
5354
"babel-preset-env": "^1.7.0",
5455
"babel-preset-react": "^6.24.1",
@@ -65,6 +66,7 @@
6566
"react-router": "^4.3.1",
6667
"react-router-dom": "^4.3.1",
6768
"sass": "^1.14.1",
68-
"serve-favicon": "^2.5.0"
69+
"serve-favicon": "^2.5.0",
70+
"styled-components": "^4.0.2"
6971
}
7072
}

src/components/Pages/AddNew/InstructionText.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
import React from "react";
22
import PropTypes from "prop-types";
3+
import styled from "styled-components";
4+
5+
const StyledInstructionH2 = styled.h2`
6+
font-family: "Roboto", Helvetica, sans-serif;
7+
font-weight: 700;
8+
`;
39

410
export default class InstructionText extends React.Component {
511
render() {
6-
return <h2 id="revision-title">{this.props.text}</h2>;
12+
return (
13+
<StyledInstructionH2 id="revision-title">
14+
{this.props.text}
15+
</StyledInstructionH2>
16+
);
717
}
818
}
919

0 commit comments

Comments
 (0)