LocationIndex
Template component for displaying a list of locations (separated into regions) with contact details.
Installation
yarn add @berlitz/location-index
Props
Argument | Type | Required | Default | Example |
---|---|---|---|---|
locationData | array | X | [] | ./exampleData.json |
Region {
"title": "Arizona",
"locations": [
{
"heading": "Phoenix Language Center",
"url": "/language-centers/phoenix",
"latitude": "33.412894",
"longitude": "-111.970773",
"nonPhysicalLocation": false,
"image": {
"url": "https://images.contentstack.io/v3/assets/blt0d8161bc558c59f6/blt2bcec7461914abd2/5c74b1c792df13976041fbb0/Phoenix_Language_Center.jpg",
"description": "alt text here"
},
"streetAddress": "2005 W. 14th Street Suite 128",
"addressLocality": "Tempe",
"addressRegion": "Arizona",
"postalCode": "85281",
"phone": "602-468-9494",
"addressRegionReference": [
{
"title": "Arizona"
}
]
}
]
}
Usage
import LocationIndex from '@berlitz/location-index'
import exampleData from './exampleData.json'
const MyApp = () => <LocationIndex locationData={exampleData} />