Sha256: 926c9f01688a4f8b7ee0944fe31042030dba181caeb437fad4265ea981fa451a
Contents?: true
Size: 760 Bytes
Versions: 5
Compression:
Stored size: 760 Bytes
Contents
/* @flow */ /* eslint-disable react/no-multi-comp, flowtype/space-before-type-colon */ import React from 'react' import {Badge} from '../' type HashtagProps = { className?: String, data?: String, dark?: Boolean, id?: String, text?: String, type: 'default' | 'home' | 'project', url?: String, } const HashType = { "home": "H#", "project": "P#", "default": "#" } const Hashtag = ({ className, data, dark = false, id, text, type, url } : HashtagProps) => { const darkClass = dark === true ? "dark" : "" return ( <div className={`pb_hashtag_kit_${darkClass}`}> <a href={url}> <Badge variant="primary" text={HashType[type] + text} dark={dark}></Badge> </a> </div> ) } export default Hashtag
Version data entries
5 entries across 5 versions & 1 rubygems