Sha256: dfbc38753ed5c202e90851ab682874c78824193457e72dca5614b89ed5f62579

Contents?: true

Size: 541 Bytes

Versions: 10

Compression:

Stored size: 541 Bytes

Contents

/* @flow */

import React from 'react'

type CaptionProps = {
  children: Array<React.ReactNode> | React.ReactNode,
  dark?: Boolean,
  large?: Boolean,
  tag: String,
  text: String,
}

const Caption = ({
  children,
  dark=false,
  large=false,
  tag='div',
  text,
}: CaptionProps) => {

  const Tag = `${tag}`

  return (
    <Tag
        className={
        `pb_caption_kit` +
        (large === true ? '_lg' : '') +
        (dark === true ? '_dark' : '')
      }
    >
      {text || children}
    </Tag>
  )
}

export default Caption

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
playbook_ui-2.9.7 app/pb_kits/playbook/pb_caption/_caption.jsx
playbook_ui-2.9.6 app/pb_kits/playbook/pb_caption/_caption.jsx
playbook_ui-2.9.5 app/pb_kits/playbook/pb_caption/_caption.jsx
playbook_ui-2.9.4 app/pb_kits/playbook/pb_caption/_caption.jsx
playbook_ui-2.9.3 app/pb_kits/playbook/pb_caption/_caption.jsx
playbook_ui-2.9.2 app/pb_kits/playbook/pb_caption/_caption.jsx
playbook_ui-2.9.1 app/pb_kits/playbook/pb_caption/_caption.jsx
playbook_ui-2.9.0 app/pb_kits/playbook/pb_caption/_caption.jsx
playbook_ui-2.8.9 app/pb_kits/playbook/pb_caption/_caption.jsx
playbook_ui-2.8.8 app/pb_kits/playbook/pb_caption/_caption.jsx