Sha256: 17de5084e4f1b8e703f60ef8a6340301bbc46998e863513815378a23efbb2f97

Contents?: true

Size: 930 Bytes

Versions: 9

Compression:

Stored size: 930 Bytes

Contents

/* @flow */

import React from 'react'
import { Button, Icon } from '../'

import type { Callback } from '../types'

import {
  noop,
} from '../utilities/props'

type CircleIconButtonProps = {
  className?: String,
  dark?: Boolean,
  disabled?: Boolean,
  icon: String,
  id?: String,
  onClick?: Callback,
  type?: 'button' | 'submit' | 'reset',
  variant?: 'primary' | 'secondary' | 'link',
}

const CircleIconButton = (props: CircleIconButtonProps) => {
  const {
    dark,
    disabled,
    icon,
    onClick = noop,
    type,
    variant,
  } = props

  return (
    <div className="pb_circle_icon_button_kit">
      <Button
          dark={dark}
          disabled={disabled}
          onClick={onClick}
          text={null}
          type={type}
          variant={variant}
      >
        <Icon
            fixedWidth
            icon={icon}
        />
      </Button>
    </div>
  )
}

export default CircleIconButton

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
playbook_ui-4.15.0 app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx
playbook_ui-4.14.0 app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx
playbook_ui-4.15.1.alpha1 app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx
playbook_ui-4.13.1 app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx
playbook_ui-4.13.0 app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx
playbook_ui-4.12.0 app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx
playbook_ui-4.11.0 app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx
playbook_ui-4.11.0.pre.alpha3 app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx
playbook_ui-4.11.0.pre.alpha.pre.2 app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx