API REFERENCE

Subheader Builder

create

This is require since layout can have multiple Subheaders

Interface

type create = (subheaderId: string) => ISubheaderRegistry;

registerConfig

configuration is the same as HeaderBuilder

Usage Example

Always configure Header before Subheaders.

scheme.configureHeader(builder => {
  builder.registerConfig('xs', {
    position: 'fixed',
    initialHeight: 64,
    layer: 2, // 
    clipped: true
  })
});
scheme.configureSubheader(builder => {
  builder.create('subheader')
    .registerConfig('xs', {
      position: 'relative',
      initialHeight: 40,
      layer: 1,
      clipped: true
    })  
});

layer is required in this case, otherwise when you scroll the page, subheader will be in front of Header. If you open devtool, you will see that layer will increase the number of z-index.

You can call create with any id you like but only string is allowed. After you calling this function, you can register a config by chaining this method.