Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(Itinerary): the content prop #4157

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ interface ContentItem {
readonly items: Detail[];
}
export interface Props {
/** The content of ItineraryDetail component, when it's not expanded */
/** The content of ItinerarySegmentDetail component, when it's not expanded */
readonly summary: React.ReactNode;
/** The content of ItineraryDetail component, shown when it's expanded */
/** The content of ItinerarySegmentDetail component, shown when it's expanded */
readonly content?: ContentItem[];
/** The duration between two Itinerary parts */
readonly duration: string;
Expand Down
39 changes: 29 additions & 10 deletions packages/orbit-components/src/Itinerary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,38 @@ ItinerarySegmentDetail serves as a connection between two ItinerarySegmentStop c

### Props

| Name | Type | Required | Default | Description |
| -------- | ----------------- | ------------------ | -------------- | ------------------------------------------------------------------ |
| summary | `React.ReactNode` | :heavy_check_mark: | | The content of ItineraryDetail component, when it's not expanded |
| duration | `string` | :heavy_check_mark: | | The duration between two ItinerarySegmentStop components |
| children | `React.ReactNode` | :heavy_check_mark: | | The content of ItineraryDetail component, shown when it's expanded |
| icon | `React.ReactNode` | | `<Airplane />` | The icon of ItineraryDetail component |
| Name | Type | Required | Default | Description |
| -------- | ----------------- | ------------------ | -------------- | ------------------------------------------------------------------------- |
| summary | `React.ReactNode` | :heavy_check_mark: | | The content of ItinerarySegmentDetail component, when it's not expanded |
| duration | `string` | :heavy_check_mark: | | The duration between two ItinerarySegmentStop components |
| content | `ContentItem[]` | | | The content of ItinerarySegmentDetail component, shown when it's expanded |
| icon | `React.ReactNode` | | `<Airplane />` | The icon of ItinerarySegmentDetail component |

### ContentItem

The table below contains the types of props of objects of type `ContentItem`.

| Name | Type | Description |
| :---- | :---------------- | :---------------------------- |
| title | `React.Node` | The title of the content item |
| items | `ContentDetail[]` | The items of the content item |

### ContentDetail

The table below contains the types of props of objects of type `ContentDetail`.

| Name | Type | Description |
| :---- | :----------- | :---------- |
| icon | `React.Node` | |
| name | `React.Node` | |
| value | `React.Node` | |

## ItinerarySegmentBanner

| Name | Type | Required | Default | Description |
| -------- | ----------------- | ------------------ | ------- | ------------------------------------------------------------------ |
| children | `React.ReactNode` | :heavy_check_mark: | | The content of ItineraryDetail component, shown when it's expanded |
| onClick | `React.ReactNode` | | | for handling `onClick` callback in`ItinerarySegmentBanner` |
| Name | Type | Required | Default | Description |
| -------- | ----------------- | ------------------ | ------- | ---------------------------------------------------------- |
| children | `React.ReactNode` | :heavy_check_mark: | | The content of ItinerarySegmentBanner component, |
| onClick | `React.ReactNode` | | | for handling `onClick` callback in`ItinerarySegmentBanner` |

## ItinerarySeparator

Expand Down
Loading