import { gloss } from 'gloss' import React from 'react' import { BorderBottom, BorderLeft, BorderRight, BorderTop } from './Border' import { Size } from './Space' import { SurfacePassProps } from './SurfacePropsContext' import { Stack, StackProps } from './View/Stack' export type ToolbarProps = Omit & { attach?: 'bottom' | 'left' | 'right' | 'top' size?: Size } const borderElement = { top: , bottom: , left: , right: , } const opposite = { bottom: 'top', top: 'bottom', left: 'right', right: 'left', } export function Toolbar({ children, size = 'sm', // todo can make elevation scale with size... elevation, attach = 'bottom', border, ...props }: ToolbarProps) { return ( {!!border && borderElement[attach]} {children} ) } const ToolbarRow = gloss(Stack, { flexDirection: 'row', alignItems: 'center', width: '100%', position: 'relative', }).theme(props => ({ background: props.backgroundStrong, }))