ol-badge.tsx 475 B

1234567891011121314151617
  1. import Badge from '@/shared/components/badge/badge'
  2. function OLBadge(props: React.ComponentProps<typeof Badge>) {
  3. let { bg, text, ...rest } = props
  4. // For warning badges, use a light background by default. We still want the
  5. // Bootstrap warning colour to be dark for text though, so make an
  6. // adjustment here
  7. if (bg === 'warning') {
  8. bg = 'warning-light-bg'
  9. text = 'warning'
  10. }
  11. return <Badge bg={bg} text={text} {...rest} />
  12. }
  13. export default OLBadge