From 87b10ead96357c4380d58b8763f2e0344625bef7 Mon Sep 17 00:00:00 2001 From: dleadbetter Date: Mon, 12 Aug 2024 10:27:58 -0400 Subject: [PATCH] RC #291 - Adding optional "description" prop to FacetTimeline component; Adjusting padding based on "description" prop --- .../core-data/src/components/FacetTimeline.js | 28 +++++++++++++------ .../src/core-data/FacetTimeline.stories.js | 9 ++++++ 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/packages/core-data/src/components/FacetTimeline.js b/packages/core-data/src/components/FacetTimeline.js index 2758a811..1de88a77 100644 --- a/packages/core-data/src/components/FacetTimeline.js +++ b/packages/core-data/src/components/FacetTimeline.js @@ -15,7 +15,7 @@ import React, { import _ from 'underscore'; import type { Event as EventType } from '../types/Event'; import EventUtils from '../utils/Event'; -import FacetSlider, { Action as ActionType, ClassNames as ClassNamesType } from './FacetSlider'; +import FacetSlider, { type Action as ActionType, type ClassNames as ClassNamesType } from './FacetSlider'; import { useEventsService } from '../hooks/CoreData'; type Props = { @@ -44,6 +44,11 @@ type Props = { */ defaultMin: number, + /** + * If `true`, the event popover content will display the event description. + */ + description?: boolean, + /** * Callback fired when the event popover is clicked. */ @@ -127,11 +132,16 @@ const FacetTimeline = (props: Props) => { return (