Sha256: d9b4ace20f6a85a4ded420e6022da3abf7bf52761f579807944c08e8c9788c61
Contents?: true
Size: 1.23 KB
Versions: 7
Compression:
Stored size: 1.23 KB
Contents
/* @flow */ import React from 'react' import classnames from 'classnames' import { Caption } from '../' import { buildCss } from '../utilities/props' import { globalProps } from '../utilities/globalProps.js' type NavProps = { title: String, orientation?: "vertical" | "horizontal", link: String, children?: React.Node, className?: String | Array<String>, highlight?: Boolean, variant?: "normal" | "subtle", onClick?: EventHandler, } const Nav = (props: NavProps) => { const { title = '', orientation = 'vertical', link = '', children, className, highlight = true, variant = 'normal', onClick = () => {}, } = props const cardCss = buildCss('pb_nav_list', variant, orientation, className, { highlight: highlight, }) return ( <div className={classnames(cardCss, globalProps(props))}> <If condition={title}> <div className="pb_nav_list_title"> <a className="pb_nav_list_item_link_text" href={link} onClick={onClick} > <Caption size="md" text={`${title}`} /> </a> </div> </If> <ul>{children}</ul> </div> ) } export default Nav
Version data entries
7 entries across 7 versions & 1 rubygems