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-6.6.0 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-6.5.2 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-7.0.1.pre.alpha12 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-7.0.1.pre.alpha11 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-7.0.1.pre.alpha10 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-7.0.1.pre.alpha9 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-6.5.1 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-6.5.0 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-7.0.1.pre.alpha8 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-7.0.1.pre.alpha7 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-7.0.1.pre.alpha6 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-7.0.1.pre.alpha5 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-7.0.1.pre.alpha4 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-7.0.1.pre.alpha3 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-7.0.1.pre.alpha2 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-6.4.2 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-7.0.1.pre.alpha1 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-7.0.0.pre.alpha9 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-7.0.0.pre.alpha8 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx
playbook_ui-7.0.0.pre.alpha7 app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx