Callout
Action completed
Your request has been processed successfully.Action completed
Your request has been processed successfully.Action completed
Your request has been processed successfully.Example
import { Container } from '@components/container'
import { Callout, CalloutProps, Description, Flex, H5, Show, useTheme } from '@creation-ui/react'
interface CalloutExampleProps extends Omit<CalloutProps, 'children' | 'variant'> {
title?: string
content?: string
}
export const Example = ({ title, content, ...props }: CalloutExampleProps) => {
const { styles } = useTheme()
return (
<Callout {...props} variant={variant}>
<Flex column>
<Show when={!!title}>
<H5>{title}</H5>
</Show>
<Description className='!text-inherit'>{content}</Description>
</Flex>
</Callout>
)
}
Component API
Prop | Default | Description |
children | — | React.ReactNode Children to be rendered inside the component |
color | — | primary | error | warning | success | info | mono | undefined Status |
variant | contained | contained | outlined | text Variant of the element |