Documentation
Feedback & Status
Callout

Callout

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

Callout component props.

PropDefaultDescription
children
React.ReactNode

Children to be rendered inside the component

color
primary | error | warning | success | info | mono | undefined

Status

variantcontained
contained | outlined | text

Variant of the element