API REFERENCE

Subheader

Usage example

Same as Header, Subheader will have this style by default

display: flex;
height: ${initialHeight};    

initialHeight is from config

import styled from 'styled-components'
import Toolbar from '@material-ui/core/Toolbar';
import Layout, { Root, getSubheader } from '@mui-treasury/layout';

const Subheader = getSubheader(styled)

cosnt scheme = Layout()

const App = () => {
  return (
    <Root scheme={scheme}>
      <Subheader>
        This is a subheader
      </Subheader>
    </Root>
  )
}

Props

  • subheaderId
    • type : string
    • required : yes
    • description : id that will match subheader config

Styling

You can pass className or style to Subheader directly, under the hood Subheader is a simple html div

<Subheader subheaderId="some_id" /> => <div>...</div>