Sha256: ac695ec97e98d6bbdfe1380ad93f5664f02f762db5c521da2f6e9999920e950a

Contents?: true

Size: 1.54 KB

Versions: 16

Compression:

Stored size: 1.54 KB

Contents

/* @flow */

import React from 'react'
import classnames from 'classnames'

import { joinPresent, titleize } from '../utilities/text'
import { Body, Hashtag, Title } from '../'

type HomeAddressStreetProps = {
  address: String,
  addressCont: String,
  city: String,
  className?: String,
  dark?: Boolean,
  homeId: Number,
  houseStyle: String,
  homeUrl: String,
  state: String,
  zipcode: String,
  territory: String,
}

const classes = (className, dark) => (
  classnames(className, {
    'pb_home_address_street': !dark,
    'pb_home_address_street_dark': dark,
  })
)

const HomeAddressStreet = ({
  address,
  addressCont,
  city,
  className,
  dark = false,
  homeId,
  homeUrl,
  houseStyle,
  state,
  zipcode,
  territory,
}: HomeAddressStreetProps) => (
  <div className={classes(className, dark)}>
    <Title
        className="pb_home_address_street_address"
        dark={dark}
        size={4}
    >
      {joinPresent([titleize(address), houseStyle], ' ยท ')}
    </Title>

    <Title
        className="pb_home_address_street_address"
        dark={dark}
        size={4}
    >
      {titleize(addressCont)}
    </Title>
    <Body color="light">
      {`${titleize(city)}, ${state} ${zipcode}`}
    </Body>
    <If condition={homeId}>
      <Hashtag
          classname="home-hashtag"
          dark={dark}
          text={homeId}
          type="home"
          url={homeUrl || '#'}
      />
    </If>
    <Body
        color="light"
        tag="span"
    >
      <small>{territory}</small>
    </Body>
  </div>
)

export default HomeAddressStreet

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
playbook_ui-4.6.1 app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx
playbook_ui-4.6.0 app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx
playbook_ui-4.5.2 app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx
playbook_ui-4.5.1 app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx
playbook_ui-4.5.0 app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx
playbook_ui-4.4.1 app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx
playbook_ui-4.4.0 app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx
playbook_ui-4.3.1 app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx
playbook_ui-4.3.0 app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx
playbook_ui-4.2.0 app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx
playbook_ui-4.1.2 app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx
playbook_ui-4.1.1 app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx
playbook_ui-4.1.0 app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx
playbook_ui-4.0.1 app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx
playbook_ui-4.0.0 app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx
playbook_ui-3.5.0 app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx