Skip to content

Instantly share code, notes, and snippets.

@damusnet
Created July 5, 2018 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damusnet/bed5b5293738a35d899452beab1a3f6c to your computer and use it in GitHub Desktop.
Save damusnet/bed5b5293738a35d899452beab1a3f6c to your computer and use it in GitHub Desktop.
import React, { Component } from "react";
import { DeviceSizeListener, DeviceSwitch } from "../../src";
const BREAKPOINT = "min-width: 600px";
const example = () => (
<DeviceSizeListener breakpoint={BREAKPOINT}>
<DeviceSwitch
mobileRender="Mobile!"
desktopRender="Not a Mobile!"
/>
</DeviceSizeListener>
);
export default example;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment