Skip to content

Commit 7deb0a2

Browse files
committed
done with blue block button
1 parent 33fa1a1 commit 7deb0a2

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

src/content/create-blue-block-button-1.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ framework: react
99
chapter: Building reusable components
1010
---
1111

12-
In this chapter we will build out our components that we will be using through out the application. First lets go ahead and create a Secondary button Blue.
12+
In this chapter we will build out a Secondary button Blue.
1313

14-
In the components folder create a folder called buttons. Then create a BlueBlockButton.js component and add the following:
14+
In the `buttons` folder, create a `BlueBlockButton.js` component and add the following:
1515

16-
```
17-
import React from "react";
18-
import PropTypes from "prop-types";
19-
import styled, { keyframes } from "styled-components";
20-
import loading from "../../assets/loop.svg";
16+
```javascript
17+
import React from "react"
18+
import PropTypes from "prop-types"
19+
import styled, { keyframes } from "styled-components"
20+
import loading from "../../assets/loop.svg"
2121

2222
const rotate = keyframes`
2323
from {
@@ -26,11 +26,11 @@ const rotate = keyframes`
2626
to {
2727
transform: rotate(360deg);
2828
}
29-
`;
29+
`
3030
const ImageStyles = styled.img`
3131
display: inline-block;
3232
animation: ${rotate} 2s infinite linear;
33-
`;
33+
`
3434

3535
const BlueBlockButton = ({
3636
className = "",
@@ -52,8 +52,8 @@ const BlueBlockButton = ({
5252
>
5353
{isLoading ? <ImageStyles src={loading} alt="loading..." /> : children}
5454
</button>
55-
);
56-
};
55+
)
56+
}
5757
const propTypes = {
5858
className: PropTypes.string,
5959
onClick: PropTypes.func,
@@ -62,11 +62,9 @@ const propTypes = {
6262
large: PropTypes.bool,
6363
long: PropTypes.bool,
6464
isLoading: PropTypes.bool,
65-
};
66-
BlueBlockButton.propTypes = propTypes;
67-
export default BlueBlockButton;
68-
69-
65+
}
66+
BlueBlockButton.propTypes = propTypes
67+
export default BlueBlockButton
7068
```
7169

7270
Yet again we are doingg something simalr, only difference is that it is a different colour button.

0 commit comments

Comments
 (0)