import React from 'react'
import { Breadcrumbs } from '@freesewing/react/components/Breadcrumbs'
import { Link as DefaultLink } from '@freesewing/react/components/Link'
/*
* This is the default layout, including title and breadcrumbs
*
* @param {object} props - All React props
* @param {array} props.children - The content to go in the layout
* @param {array} props.crumbs - Data for the breadcrumbs
* @param {string} props.description - The page description
* @param {function} props.Link - An optional framework specific Link component
* @param {string} props.title - The page title
*/
export const Layout = ({ children = [], crumbs = [], description, Link = false, title }) => {
if (!Link) Link = DefaultLink
return (
)
}
/*
* This is the base layout
*
* @param {object} props - All React props
* @param {array} props.children - The content to go in the layout
*/
export const BaseLayout = ({ children }) => (
{children}
)
/*
* The left column of the base layout
*
* @param {object} props - All React props
* @param {array} props.children - The content to go in the layout
*/
export const BaseLayoutLeft = ({ children = [] }) => (
{children}
)
/*
* The right column of the base layout
*
* @param {object} props - All React props
* @param {array} props.children - The content to go in the layout
*/
export const BaseLayoutRight = ({ children = [] }) => (
{children}
)
/*
* The main column for prose (text like docs and so on)
*
* @param {object} props - All React props
* @param {array} props.children - The content to go in the layout
* @param {array} props.wide - Whether or not to use the wide view
*/
export const BaseLayoutProse = ({ children = [], wide = false }) => (
{children}
)
/*
* The central column for wide content (no max-width)
*
* @param {object} props - All React props
* @param {array} props.children - The content to go in the layout
*/
export const BaseLayoutWide = ({ children = [] }) => (
{children}
)
/*
* A layout for pages that do their own title/layout, like the sign in page
*
* @param {object} props - All React props
* @param {array} props.children - The content to go in the layout
*/
export const NoTitleLayout = ({ children }) => {
return (
)
}