Created
February 29, 2020 16:16
-
-
Save RishikeshVedpathak/507976713ac896b979e12b80854cd635 to your computer and use it in GitHub Desktop.
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 withResponsive from "../../hoc/responsive"; | |
| const Home = (props) => { | |
| const Yes = () => <span style={{ color: "#5cb85c" }}>YES</span>; | |
| const No = () => <span style={{ color: "#d9534f" }}>NO</span>; | |
| return ( | |
| <> | |
| <div> | |
| Is Desktop : {props.responsiveInfo.isDesktop ? <Yes /> : <No />} | |
| </div> | |
| <div> | |
| Is Tablet : {props.responsiveInfo.isTablet ? <Yes /> : <No />} | |
| </div> | |
| <div> | |
| Is Mobile : {props.responsiveInfo.isMobile ? <Yes /> : <No />} | |
| </div> | |
| <div> | |
| Is Not Mobile : {props.responsiveInfo.isNotMobile ? <Yes /> : <No />} | |
| </div> | |
| <div> | |
| Is Portrait : {props.responsiveInfo.isPortrait ? <Yes /> : <No />} | |
| </div> | |
| <div> | |
| Is Retina : {props.responsiveInfo.isRetina ? <Yes /> : <No />} | |
| </div> | |
| </> | |
| ) | |
| } | |
| export default withResponsive(Home); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, did you try with styled-components, it doesn´t work for me when i reload the page