-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
70 additions
and
61 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"requirePragma": false, | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"bracketSpacing": true, | ||
"jsxBracketSameLine": false | ||
} |
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,14 +1,14 @@ | ||
import React from 'react'; | ||
import SyntaxHighlighter from 'react-syntax-highlighter'; | ||
import { github as theme } from 'react-syntax-highlighter/dist/styles'; | ||
import Block from './Block'; | ||
import React from 'react' | ||
import SyntaxHighlighter from 'react-syntax-highlighter' | ||
import { github as theme } from 'react-syntax-highlighter/dist/styles' | ||
import Block from './Block' | ||
|
||
const Code = ({ children }) => ( | ||
<Block title="Code"> | ||
<SyntaxHighlighter language="jsx" style={theme} customStyle={{ margin: 0 }}> | ||
{children} | ||
</SyntaxHighlighter> | ||
</Block> | ||
); | ||
) | ||
|
||
export default Code; | ||
export default Code |
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,17 +1,20 @@ | ||
import React from 'react'; | ||
import withSizes from '../../src/withSizes'; | ||
import React from 'react' | ||
import withSizes from '../../src/withSizes' | ||
|
||
const MobileBreakpoint = ({ isMobile, breakpoint, width }) => ( | ||
<div> | ||
<div>breakpoint: {breakpoint} | width: {width}</div> | ||
<div> | ||
breakpoint: {breakpoint} | width: {width} | ||
</div> | ||
<div>{isMobile ? 'Is Mobile' : 'Is Not Mobile'}</div> | ||
<br /><br /> | ||
<br /> | ||
<br /> | ||
</div> | ||
); | ||
) | ||
|
||
const mapSizesToProps = ({ width }, { breakpoint }) => ({ | ||
isMobile: width < breakpoint, | ||
width, | ||
}); | ||
}) | ||
|
||
export default withSizes(mapSizesToProps)(MobileBreakpoint); | ||
export default withSizes(mapSizesToProps)(MobileBreakpoint) |
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,10 +1,6 @@ | ||
import React from 'react'; | ||
import Block from './Block'; | ||
import React from 'react' | ||
import Block from './Block' | ||
|
||
const Result = ({ children }) => ( | ||
<Block title="Result"> | ||
{children} | ||
</Block> | ||
); | ||
const Result = ({ children }) => <Block title="Result">{children}</Block> | ||
|
||
export default Result; | ||
export default Result |
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,3 +1,3 @@ | ||
export Block from './Block'; | ||
export Code from './Code'; | ||
export Result from './Result'; | ||
export Block from './Block' | ||
export Code from './Code' | ||
export Result from './Result' |
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,5 +1,6 @@ | ||
import withSizes from './withSizes' | ||
import * as presets from './presets' | ||
|
||
export default Object.assign(withSizes, presets) | ||
import createSizedComponent from './createSizedComponent' | ||
import presets from './presets' | ||
|
||
export { createSizedComponent, presets, withSizes } | ||
export default withSizes |
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,9 +1,8 @@ | ||
const getDisplayName = (Component) => ( | ||
const getDisplayName = Component => | ||
Component.displayName || | ||
Component.name || | ||
(typeof Component === 'string' && Component.length > 0 | ||
? Component | ||
: 'Unknown') | ||
) | ||
|
||
export default getDisplayName |
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