Sha256: 5d27f35e3ebaa662ade2e7cb459be8d0bde83145350d7d82f5c0c206f90af03b
Contents?: true
Size: 1.56 KB
Versions: 44
Compression:
Stored size: 1.56 KB
Contents
/* @flow */ import React from 'react' import classnames from 'classnames' import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props' import type { Callback } from '../types' import { noop } from '../utilities/props' import { globalProps } from '../utilities/globalProps' import Button from '../pb_button/_button' import Icon from '../pb_icon/_icon' type CircleIconButtonProps = { aria?: object, className?: string, dark?: boolean, data?: object, disabled?: boolean, icon: string, id?: string, link?: string, onClick?: Callback, newWindow?: boolean, type?: 'button' | 'submit' | 'reset', variant?: 'primary' | 'secondary' | 'link', } const CircleIconButton = (props: CircleIconButtonProps) => { const { aria = {}, className, dark, data = {}, disabled, icon, id, onClick = noop, type, link, newWindow, variant, } = props const ariaProps = buildAriaProps(aria) const dataProps = buildDataProps(data) const classes = classnames( buildCss('pb_circle_icon_button_kit'), globalProps(props), className ) return ( <div {...ariaProps} {...dataProps} className={classes} id={id} > <Button dark={dark} disabled={disabled} link={link} newWindow={newWindow} onClick={onClick} text={null} type={type} variant={variant} > <Icon fixedWidth icon={icon} /> </Button> </div> ) } export default CircleIconButton
Version data entries
44 entries across 44 versions & 1 rubygems