Skip to content

Commit e0be4eb

Browse files
authored
Blockquote (ifmeorg#896)
* blockquote * Emoji added * Update Blockquote.jsx * Update Blockquote.scss * Update Blockquote.stories.jsx * Update Blockquote.jsx * Update Blockquote.jsx * Update Blockquote.jsx * Update Blockquote.jsx * author prop * Update Blockquote.jsx * Update Blockquote.stories.jsx * Update Blockquote.stories.jsx * Update Blockquote.scss * Update Blockquote.stories.jsx * Final edit * Class to container * Update schema.rb * minwidth changed * Font size changed * Update Blockquote.jsx * Author class * Author class
1 parent 74cac21 commit e0be4eb

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// @flow
2+
import React from 'react';
3+
import css from './Blockquote.scss';
4+
5+
type Props = {
6+
text?: string,
7+
author?: string,
8+
};
9+
10+
export default class Blockquote extends React.Component<Props> {
11+
render() {
12+
const { text, author } = this.props;
13+
const textClassNames = `${css.text}`;
14+
const authorClassNames = `${css.author}`;
15+
return (
16+
<div className={textClassNames}>
17+
<p>
18+
<q>
19+
{text}
20+
</q>
21+
</p>
22+
<div className={authorClassNames}>
23+
{author}
24+
</div>
25+
</div>
26+
);
27+
}
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
@import "_legacy.scss";
2+
@import "_base.scss";
3+
4+
.text {
5+
display: inline-block;
6+
position: relative;
7+
8+
background-color: rgba(255, 255, 255, 0.1);
9+
font-family: Lato, sans-serif;
10+
font-style: italic;
11+
font-size: 24px;
12+
line-height: 1.2;
13+
text-align: center;
14+
align-content: center;
15+
text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.25);
16+
17+
width: 100%;
18+
padding: 20px;
19+
@media screen and (min-width: 960px) {
20+
padding: 50px;
21+
font-size: 36px;
22+
}
23+
24+
color: white;
25+
26+
.author {
27+
margin-top: 10px;
28+
}
29+
}
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
import React from 'react';
3+
import { storiesOf } from '@storybook/react';
4+
5+
import Blockquote from 'bundles/shared/components/Blockquote';
6+
import { SingleColumnLayout, withSource } from './Stories.helper';
7+
8+
storiesOf('Blockquotes', module)
9+
.add('Blockquote', withSource(
10+
<SingleColumnLayout>
11+
<Blockquote text="It's not just all in your head, it's all around you. We can heal together." author="❤️" />
12+
</SingleColumnLayout>,
13+
));

0 commit comments

Comments
 (0)