Sha256: 5e9945f9a1e6a5d6e2a37ef46e4f30fce0eab20de35f51e281c0fa564070160d
Contents?: true
Size: 826 Bytes
Versions: 10
Compression:
Stored size: 826 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' type HashtagProps = { className?: String, data?: String, dark?: Boolean, id?: String, text?: String, type: 'default' | 'home' | 'project', url?: String, } const typeMap = { 'home': 'H#', 'project': 'P#', 'default': '#', } const Hashtag = ({ className, dark = false, text, type, url, }: HashtagProps) => ( <span className={classnames(className, buildCss('pb_hashtag_kit', { 'dark': dark }))}> <a href={url}> <Badge dark={dark} text={typeMap[type] + text} variant="primary" /> </a> </span> ) export default Hashtag
Version data entries
10 entries across 10 versions & 1 rubygems