/* @flow */ import React from 'react' import classnames from 'classnames' import { joinPresent, titleize } from '../utilities/text' import { globalProps } from '../utilities/globalProps' import Body from '../pb_body/_body' import Hashtag from '../pb_hashtag/_hashtag' import Title from '../pb_title/_title' type HomeAddressStreetProps = { address: string, addressCont: string, city: string, className?: string, dark?: boolean, emphasis: "street" | "city", homeId: number, houseStyle: string, homeUrl: string, state: string, zipcode: string, territory: string, } const HomeAddressStreet = (props: HomeAddressStreetProps) => { const { address, addressCont, city, className, dark = false, emphasis = 'street', homeId, homeUrl, houseStyle, state, zipcode, territory, } = props const classes = (className, dark) => classnames( { 'pb_home_address_street': !dark, 'pb_home_address_street_dark': dark, }, globalProps(props), className ) return (
{
{joinPresent([titleize(address), houseStyle], ' · ')} {titleize(addressCont)} {`${titleize(city)}, ${state} ${zipcode}`}
{joinPresent([titleize(address), houseStyle], ' · ')} {titleize(addressCont)}
{`${titleize(city)}, ${state}`} {` ${zipcode}`}
} {territory}
) } export default HomeAddressStreet