Skip to content

Commit

Permalink
docs(Itinerary): the content prop
Browse files Browse the repository at this point in the history
  • Loading branch information
jozef-mikusinec-kiwicom authored and DSil committed Nov 20, 2023
1 parent 861def6 commit 01abdb9
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 12 deletions.
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

0 comments on commit 01abdb9

Please sign in to comment.