Sha256: c7960c93358836c77f1d108b807554db71eb951f80e861f717ac9311c77be3de

Contents?: true

Size: 1.1 KB

Versions: 189

Compression:

Stored size: 1.1 KB

Contents

/* @flow */

import React from 'react'

import classnames from 'classnames'

import { Icon } from '../'
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
import { globalProps } from '../utilities/globalProps.js'

type IconCircleProps = {
  aria?: object,
  className?: string,
  dark?: boolean,
  data?: object,
  icon: string,
  id?: string,
  size?: "base" | "xs" | "sm" | "md" | "lg" | "xl",
  variant?: | "default"
    | "royal"
    | "blue"
    | "purple"
    | "teal"
    | "red"
    | "yellow"
    | "green",
}

const IconCircle = (props: IconCircleProps) => {
  const { aria = {}, className, dark = false, data = {}, icon, id, size = 'md', variant = 'default' } = props

  const ariaProps = buildAriaProps(aria)
  const dataProps = buildDataProps(data)
  const classes = classnames(buildCss('pb_icon_circle_kit', size, variant), globalProps(props), className)

  return (
    <div
        {...ariaProps}
        {...dataProps}
        className={classes}
        id={id}
    >
      <Icon
          dark={dark}
          icon={icon}
      />
    </div>
  )
}

export default IconCircle

Version data entries

189 entries across 189 versions & 1 rubygems

Version Path
playbook_ui-9.19.0 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-9.19.0.pre.alphafonts app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-9.18.0.flow.bin.alpha app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-9.18.0 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-9.17.0 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-9.17.0.pre.decouple.website2 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-9.16.0 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-9.15.0 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-9.15.0.pre.decouple.website1 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-9.14.1.alpha.radio.alignment app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-9.14.1.alpha.highcharts9 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-9.14.1 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-9.13.0 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-9.12.0 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-9.12.0.pre.text.addon app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-9.11.0 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-9.10.0 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-9.10.0.pre.date.time.stacked.1 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-9.10.0.pre.alpha2 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-9.10.0.pre.alpha1 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx