Sha256: 4dea9f386b9c0ad81a781db1cf71ae756af63d20191065b44f177b3a0d65ce43
Contents?: true
Size: 1022 Bytes
Versions: 7
Compression:
Stored size: 1022 Bytes
Contents
/* @flow */ /* eslint-disable react/no-multi-comp, flowtype/space-before-type-colon */ import React from 'react' import classnames from 'classnames' import { Badge } from '../' import { buildCss } from '../utilities/props' import { globalProps } from '../utilities/globalProps.js' type HashtagProps = { className?: String, data?: String, dark?: Boolean, id?: String, text?: String, type: "default" | "home" | "project" | "appointment", url?: String, } const typeMap = { home: 'H#', project: 'P#', appointment: 'A#', default: '#', } const Hashtag = (props: HashtagProps) => { const { className, dark = false, text, type, url } = props return ( <span className={classnames( className, buildCss('pb_hashtag_kit', { dark: dark }), globalProps(props) )} > <a href={url}> <Badge dark={dark} text={typeMap[type] + text} variant="primary" /> </a> </span> ) } export default Hashtag
Version data entries
7 entries across 7 versions & 1 rubygems