How to use the @mui-treasury/layout.useScreen function in @mui-treasury/layout

To help you get started, we’ve selected a few @mui-treasury/layout examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github siriwatknp / mui-treasury / website / src / components / layout / PageHeader.js View on Github external
const PageHeader = () => {
  const data = useStaticQuery(graphql`
    query HeaderQuery {
      logo: file(absolutePath: { regex: "/logo.png/" }) {
        childImageSharp {
          fixed(width: 48, height: 48) {
            ...GatsbyImageSharpFixed
          }
        }
      }
    }
  `);
  const { logo } = data;
  const styles = useStyles();
  const screen = useScreen();
  return (
    
      {({ location }) => {
        const shouldRenderLogo =
          screen !== 'xs' || (screen === 'xs' && location.pathname === '/');
        return (
          
            {shouldRenderLogo && (

@mui-treasury/layout

mui-treasury | layout-core

MIT
Latest version published 3 years ago

Package Health Score

64 / 100
Full package analysis

Similar packages