Sha256: c06ec2f97b4fae883b07c45a62874146bc3cc82b019b159113e4d2c8f84361dd
Contents?: true
Size: 1.49 KB
Versions: 44
Compression:
Stored size: 1.49 KB
Contents
/* @flow */ import React from 'react' import classnames from 'classnames' import { spacing } from '../utilities/spacing.js' type IconProps = { aria?: Object, border?: Boolean, className?: String, fixedWidth?: Boolean, flip?: "horizontal" | "vertical" | "both" | "none", icon: String, id?: String, inverse?: Boolean, listItem?: Boolean, pull?: "left" | "right" | "none", pulse?: Boolean, rotation?: 90 | 180 | 270, size?: | "lg" | "xs" | "sm" | "1x" | "2x" | "3x" | "4x" | "5x" | "6x" | "7x" | "8x" | "9x" | "10x", spin?: Boolean, } const flipMap = { horizontal: 'fa-flip-horizontal', vertical: 'fa-flip-vertical', both: 'fa-flip-horizontal fa-flip-vertical', } const Icon = (props: IconProps) => { const { border = false, className, fixedWidth = true, flip = false, icon, id, inverse = false, listItem = false, pull, pulse = false, rotation, size, spin = false, } = props const classes = classnames( className, flipMap[flip], 'pb_icon_kit', 'far', { 'fa-border': border, 'fa-fw': fixedWidth, 'fa-inverse': inverse, 'fa-li': listItem, 'fa-pulse': pulse, 'fa-spin': spin, [`fa-${icon}`]: icon, [`fa-${size}`]: size, [`fa-pull-${pull}`]: pull, [`fa-rotate-${rotation}`]: rotation, }, spacing(props) ) return ( <i className={classes} id={id} /> ) } export default Icon
Version data entries
44 entries across 44 versions & 1 rubygems