Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
__tests__
README.md
TripSegment.stories.js
index.js
index.js.flow

README.md

TripSegment

To implement TripSegment component into your project you'll need import component itself and pass any other component you want as children.

import TripSegment from "@kiwicom/orbit-components/lib/TripSegment";

// e.g. List component
import List from "@kiwicom/orbit-components/lib/List";
import ListItem from "@kiwicom/orbit-components/lib/List/ListItem";

After adding import into your project you can use it simply like:

<TripSegment>
  <List>
    <ListItem>Hello, World!</ListItem>
    <ListItem>Lorem Ipsum</ListItem>
  </List>
</TripSegment>

Props

Table below contains all types of the props available in TripSegment component.

Name Type Default Description
arrival Translation The arrival city name and short code.
arrivalTime Translation The arrival time.
carrier Carrier It's used to render proper icon in the Milestone, by Carrier type. See Carrier type
children React.Node The content of the component.
departure Translation The departure city and short code.
departureTime Translation The departure time.
duration Translation The flight duration.
initialExpanded boolean false If true, the children will be displayed by default.
onClick () => void | Promise Function for handling onClick event.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.