@codecraftkit
Documentation
The Box Container is used to wrap an element inside a box and add title or actions to the container.
it can be imported from the core.
import { BoxContainer } from "@codecraftkit/core";
or alone.
import BoxContainer from "@codecraftkit/boxcontainer";
<BoxContainer>Some interesting Text</BoxContainer>
<BoxContainer title="Title">Some interesting Text</BoxContainer>
<BoxContainertitle="Title"actions={<Buttonsize='xs'onClick={()=>alert("Hello World")}>Show Alert</Button>}>Some interesting Text</BoxContainer>
<BoxContainertitle="Countries"noBorderstyles={{ padding: 0 }}titleContainerStyles={{gap:2}}actions={<><Grid templateColumns='1fr repeat(2, auto)' gap={2}><Button size='xs'>Refresh</Button><Button size='xs' colorScheme='green'>Create</Button></Grid><Grid gridColumn='span 2'><Input placeholder='Enter Name' /></Grid></>}>Some interesting Text</BoxContainer>
title
Component
String
no
The name that the box will take as title
actions
Component
no
Actions on the right side of the box
children
Component
no
Component that will be the content of the box
styles
Object
no
Box Container custom styles
noBorder
Boolean
no
false
Remove Box Container border
titleContainerStyles
Object
no
title container styles
titleStyles
Object
no
title styles