-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(stories-button): add button and story selector mode * feat(stories-button): add position for button and multiple languages * feat(stories-button): add translations * refactor(stories-button): remove typo
- Loading branch information
1 parent
d981b7c
commit 03da065
Showing
8 changed files
with
73 additions
and
6 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
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
.menuContainer | ||
position: relative | ||
align-self: left | ||
margin: 20px | ||
|
||
.menuButton | ||
|
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,10 @@ | ||
.storiesButton | ||
position: absolute | ||
top: 15px | ||
right: 15px | ||
padding: 10px | ||
border-radius: 5px | ||
background-color: #ccc | ||
color: #000 | ||
text-decoration: none | ||
cursor: pointer |
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,13 @@ | ||
import React, {FunctionComponent} from 'react'; | ||
import {Link} from 'react-router-dom'; | ||
import {FormattedMessage} from 'react-intl'; | ||
|
||
import styles from './stories-button.styl'; | ||
|
||
const StoriesButton: FunctionComponent<{}> = () => ( | ||
<Link to={'/stories'} className={styles.storiesButton}> | ||
<FormattedMessage id="stories" /> | ||
</Link> | ||
); | ||
|
||
export default StoriesButton; |
12 changes: 12 additions & 0 deletions
12
src/scripts/components/stories-selector/stories-selector.styl
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,12 @@ | ||
.storiesSelector | ||
width: 100% | ||
height: 100% | ||
|
||
.title | ||
text-align: center | ||
font-size: 1.7em | ||
|
||
.backButton | ||
display: block | ||
padding: 20px 0 0 20px | ||
cursor: pointer |
21 changes: 21 additions & 0 deletions
21
src/scripts/components/stories-selector/stories-selector.tsx
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,21 @@ | ||
import React, {FunctionComponent} from 'react'; | ||
import {Link} from 'react-router-dom'; | ||
import {FormattedMessage} from 'react-intl'; | ||
|
||
import StoryList from '../story-list/story-list'; | ||
|
||
import styles from './stories-selector.styl'; | ||
|
||
const StoriesSelector: FunctionComponent<{}> = () => ( | ||
<div className={styles.storiesSelector}> | ||
<Link to="/" className={styles.backButton}> | ||
<FormattedMessage id="goBack" /> | ||
</Link> | ||
<h1 className={styles.title}> | ||
<FormattedMessage id="storymode" /> | ||
</h1> | ||
<StoryList /> | ||
</div> | ||
); | ||
|
||
export default StoriesSelector; |