Color
Usage of _color and _background attribute
- Source
- Diagram
color.tsx
import { Shape } from '@dinghy/base-components'
export default function Stack() {
return (
<Shape _title='Color Example' _direction='vertical'>
<Shape _color='blue'>Colored Shape</Shape>
<Shape _title='Color on parent only' _color='green'>
<Shape>A</Shape>
</Shape>
<Shape
_title='Background for parent'
_background='lightgrey'
_width={200}
>
<Shape>A</Shape>
</Shape>
<Shape
_title='Background for children'
_background='lightgrey'
_width={200}
>
<Shape _background='transparent'>A</Shape>
</Shape>
</Shape>
)
}
