UNPKG

bootstrap-based-components

Version:
16 lines (15 loc) 806 B
import React from 'react'; import { Container } from 'react-bootstrap'; import { Route, Switch } from 'react-router-dom'; import './style.scss'; function DisplayContainer(_a) { var config = _a.config, className = _a.className; var configs = Object.entries(config); return (React.createElement(Container, { className: "display-container " + (className !== null && className !== void 0 ? className : ''), fluid: true }, React.createElement(Switch, null, configs.map(function (route) { var name = route[0]; var _a = route[1], path = _a.path, page = _a.page; return (React.createElement(Route, { key: name, path: path.startsWith('/') ? path : "/" + path, component: page, exact: true })); })))); } export default DisplayContainer;