import * as React from 'react'; import {Icon, IconName} from '../Icon'; import styles from './Pill.scss'; import {observer} from 'mobx-react'; import classNames from 'classnames'; interface PillProps { text: string; textColor: string; border: string; backgroundColor?: string; icon?: IconName | JSX.Element; onClick?: () => void; className?: string; } @observer export class Pill extends React.Component { public render() { const {text, textColor: color, border, backgroundColor, icon, onClick, className} = this.props; return (
{typeof icon === 'string' ? : icon } {text}
); } }