This file contains hidden or 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
| printWidth: 140 | |
| trailingComma: "es5" | |
| jsxBracketSameLine: true | |
| singleQuote: true | |
| esLintIntegration: true |
This file contains hidden or 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
| class NavigationBar extends React.Component { | |
| state = { | |
| scroll: window.pageYOffset, | |
| navContainer: null, | |
| active: false, | |
| }; | |
| componentDidMount() { | |
| this.setState({ | |
| navContainer: document.getElementById('NavContainer').offsetTop, |
This file contains hidden or 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
| import styled from 'styled-components'; | |
| export const Button = styled('button')` | |
| display: block; | |
| align-items: center; | |
| color: ${({ primary}) => primary ? 'blue' : 'white'}; | |
| ... | |
| `; | |
| ... |
This file contains hidden or 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
| import styled from 'react-emotion'; | |
| import { NavLink } from 'react-router-dom'; | |
| import { Icon } from '@homelike/ui-kit'; | |
| export const Header = styled('header')` | |
| display: grid; | |
| grid-template-columns: 24px 1fr 24px; | |
| align-items: center; | |
| padding: 0 ${({ theme: { spacing } }) => spacing * 2}px; | |
| `; |
This file contains hidden or 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
| export const Panel = styled('div')` | |
| max-width: 1200px; | |
| width: 100%; | |
| margin-bottom: ${({ theme: { spacing } }) => spacing}px; | |
| @media screen and (max-width: 768px) { | |
| max-width: 400px; | |
| } | |
| `; |
This file contains hidden or 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
| import React from 'react'; | |
| import { Email, Container, Row, Column, Header, FullWidth, Footer, Text, Link, PostonentsProvider } from 'postonents'; | |
| // Data here represents the Example Data we might get passed to from the backend. | |
| // This can be anything and you need, you have to define it beforehand | |
| const VerificationEmail = ({ lang, data }) => { | |
| const { verifyToken, email } = data; | |
| return ( | |
| <PostonentsProvider theme={{ typo: { fontFamily: 'Roboto, sans-serif' } }}> |
This file contains hidden or 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
| import { renderEmail } from 'postonents'; | |
| import VerificationCodeMail from './templates/VerificationCode'; | |
| ... | |
| // Get your email templates, pass it as the entry point for the server side rendering | |
| // data in this case should align with the data needed in the template | |
| const html = renderEmail(VerificationCodeMail, { lang: 'en', data }); | |
| // This is just a generic send function |
This file contains hidden or 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
| import React from 'react'; | |
| import { getEmail } from './utils'; | |
| /** utils.js | |
| import { AccountUserDeleted } from './emails'; | |
| export const getEmail = name => { | |
| switch (name) { | |
| case 'ACCOUNT_USER_DELETED': |
OlderNewer