Class: Setup

Setup(configopt)

new Setup(configopt)

Arguments before define render

Parameters:
Name Type Attributes Description
config object <optional>

configuration for render options

Properties
Name Type Attributes Description
protect string <optional>

a user role can access view

nav bool <optional>

enable side Drawer

bar bool <optional>

Set padding 64px on top of Layout

Source:
Example
import { Setup } from 'meteor/duckdodgerbrasl:lern-layouts';
// Config
const setup = new Setup({ protect: 'admin', nav: true, bar: true });

Methods

render(main)

Render Layout and received component

Parameters:
Name Type Description
main class

Component to be rendered

Source:
Example
const setup = new Setup({ protect: 'admin', nav: true, bar: true });
setup.render({ main: <AdminHome /> });