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
.scalableSvg { | |
width: 100%; | |
height: auto; | |
display: block; | |
} |
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
.small { | |
width: 57px; | |
height: 57px; | |
} | |
.medium { | |
width: 114px; | |
height: 114px; | |
} |
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 styles from './styles.scss'; | |
export enum IllustrationSize { | |
Small = 'small', | |
Medium = 'medium', | |
Large = 'large', | |
} | |
export type IllustrationContainerProps = { |
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
const getAnimal = (sound) => { | |
switch(sound) { | |
case 'meow': | |
return 'Cat'; | |
case 'woof': | |
return 'Dog'; | |
case 'pawoo': | |
return 'Elephant'; | |
default: | |
return 'Human'; |
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
<style> | |
@font-face { | |
font-family: 'Lato'; | |
font-style: normal; | |
font-weight: 400; | |
src: url('fonts/Lato/Lato-Regular.ttf') format('truetype'); | |
} | |
.custom-font { | |
font-family: 'Lato'; |
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
const CopyWebpackPlugin = require('copy-webpack-plugin'); | |
module.exports = async ({ config }) => { | |
// fonts | |
config.plugins.push( | |
new CopyWebpackPlugin({patterns: [ | |
{ | |
from: path.resolve(__dirname, '../src/fonts/Lato'), | |
to: 'fonts/Lato' | |
}, |
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 { mount, shallow } from 'enzyme'; | |
import Wrapper from '.'; | |
describe('<Wrapper />', () => { | |
test('renders with correct className with mount', () => { | |
const wrapper = mount(<Wrapper>Children here</Wrapper>); | |
console.log(wrapper.debug()); | |
expect(wrapper.find('div').hasClass('wrapper')).toBeTruthy(); | |
}); |
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
<div className="wrapper"> | |
Children here | |
</div> |
NewerOlder