Skip to content

Commit

Permalink
Merge pull request #129 from sonaye/patch-1
Browse files Browse the repository at this point in the history
Fix view duplication in common uses example
  • Loading branch information
contra committed Oct 25, 2017
2 parents edbd8e7 + 55a0f47 commit efcc113
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,17 +225,17 @@ const Example = () => (
```javascript
import Responsive from 'react-responsive';

const Desktop = ({ children }) => <Responsive minWidth={992} children={children} />;
const Tablet = ({ children }) => <Responsive minWidth={768} maxWidth={992} children={children} />;
const Mobile = ({ children }) => <Responsive maxWidth={768} children={children} />;
const Default = ({ children }) => <Responsive minWidth={768} children={children} />;
const Desktop = props => <Responsive {...props} minWidth={992} />;
const Tablet = props => <Responsive {...props} minWidth={768} maxWidth={991} />;
const Mobile = props => <Responsive {...props} maxWidth={767} />;
const Default = props => <Responsive {...props} minWidth={768} />;

const Example = () => (
<div>
<Desktop>You are a desktop or laptop</Desktop>
<Tablet>You are a tablet</Tablet>
<Mobile>You are a mobile phone</Mobile>
<Default>You are not a mobile phone</Default>
<Desktop>Desktop or laptop</Desktop>
<Tablet>Tablet</Tablet>
<Mobile>Mobile</Mobile>
<Default>Not mobile (desktop or laptop or tablet)</Default>
</div>
);

Expand Down

0 comments on commit efcc113

Please sign in to comment.