From 01abdb9b2218d3a95bd29ed3ab0052393f2d1351 Mon Sep 17 00:00:00 2001 From: "jozef.mikusinec" Date: Mon, 20 Nov 2023 09:34:59 +0100 Subject: [PATCH] docs(Itinerary): the content prop --- .../ItinerarySegmentDetail/types.d.ts | 4 +- .../orbit-components/src/Itinerary/README.md | 39 ++++++++++++++----- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/packages/orbit-components/src/Itinerary/ItinerarySegment/ItinerarySegmentDetail/types.d.ts b/packages/orbit-components/src/Itinerary/ItinerarySegment/ItinerarySegmentDetail/types.d.ts index 2826c3a195..a5de4d6b06 100644 --- a/packages/orbit-components/src/Itinerary/ItinerarySegment/ItinerarySegmentDetail/types.d.ts +++ b/packages/orbit-components/src/Itinerary/ItinerarySegment/ItinerarySegmentDetail/types.d.ts @@ -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; diff --git a/packages/orbit-components/src/Itinerary/README.md b/packages/orbit-components/src/Itinerary/README.md index 690385e094..3828d267c6 100644 --- a/packages/orbit-components/src/Itinerary/README.md +++ b/packages/orbit-components/src/Itinerary/README.md @@ -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` | | `` | 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` | | `` | 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