{title}
@@ -47,17 +86,20 @@ export const Roadmap: React.FC = ({
{timeline.length > 0 && (
{timeline.map((item, index) => (
diff --git a/packages/logos-docusaurus-theme/src/client/components/mdx/TimelineItem/TimelineItem.scss b/packages/logos-docusaurus-theme/src/client/components/mdx/TimelineItem/TimelineItem.scss
index a323a79f..1dbc631e 100644
--- a/packages/logos-docusaurus-theme/src/client/components/mdx/TimelineItem/TimelineItem.scss
+++ b/packages/logos-docusaurus-theme/src/client/components/mdx/TimelineItem/TimelineItem.scss
@@ -3,7 +3,8 @@
.mdx-timeline-item {
width: 236px;
- height: 100%;
+ min-height: 306px;
+ justify-content: space-between;
gap: 1rem;
flex: 0 0 auto;
display: flex;
@@ -45,8 +46,18 @@
padding: 3px 12px;
display: inline-block;
border-radius: 10rem;
+}
+
+.mdx-timeline-item__period--filled {
color: rgb(var(--lsd-text-secondary)) !important;
background-color: rgb(var(--lsd-surface-secondary));
+ border: 1px solid rgb(var(--lsd-border-secondary));
+}
+
+.mdx-timeline-item__period--transparent {
+ color: rgb(var(--lsd-text-primary)) !important;
+ background-color: rgb(var(--lsd-surface-primary));
+ border: 1px solid rgb(var(--lsd-border-primary));
}
.mdx-timeline-item__item:last-child {
@@ -55,12 +66,8 @@
}
}
-.mdx-timeline-item--top-aligned {
-}
-
-.mdx-timeline-item--bottom-aligned {
- min-height: 308px;
- justify-content: space-between;
+.mdx-timeline-item__description {
+ margin-top: auto;
}
@include utils.responsive('lg', 'down') {
diff --git a/packages/logos-docusaurus-theme/src/client/components/mdx/TimelineItem/TimelineItem.tsx b/packages/logos-docusaurus-theme/src/client/components/mdx/TimelineItem/TimelineItem.tsx
index 76d8ddda..c19f8af7 100644
--- a/packages/logos-docusaurus-theme/src/client/components/mdx/TimelineItem/TimelineItem.tsx
+++ b/packages/logos-docusaurus-theme/src/client/components/mdx/TimelineItem/TimelineItem.tsx
@@ -9,14 +9,32 @@ export type TimelineItemProps = Omit<
> & {
/** The index or label of the timeline item. */
index: React.ReactNode
- /** The alignment of the timeline item, either 'top' or 'bottom'. (Optional, default: 'top') */
- alignment?: 'top' | 'bottom'
/** The period or time frame associated with the timeline item. e.g., `2023 Q3` */
- period: React.ReactNode
+ period: [number, 'Q1' | 'Q2' | 'Q3' | 'Q4' | '+'] | number
/** The description or content of the timeline item. */
description: React.ReactNode
/** The border style for the timeline item */
borderStyle?: 'solid' | 'dashed' | 'none'
+ /** The period style for the timeline item */
+ periodStyle?: 'transparent' | 'filled'
+}
+
+const formatPeriod = (input: TimelineItemProps['period']) => {
+ if (Array.isArray(input) && input.length > 0) {
+ let result = input[0].toString()
+
+ if (input.length > 1) {
+ if (input[1] === '+') {
+ result += '+'
+ } else {
+ result += ' ' + input[1]
+ }
+ }
+
+ return result
+ } else {
+ return ''
+ }
}
/**
@@ -65,12 +83,13 @@ export type TimelineItemProps = Omit<
*
* ```
*/
+
export const TimelineItem: React.FC = ({
index,
period,
description,
- alignment = 'top',
borderStyle,
+ periodStyle,
className,
children,
...props
@@ -80,7 +99,6 @@ export const TimelineItem: React.FC = ({
className={clsx(
className,
'mdx-timeline-item',
- `mdx-timeline-item--${alignment}-aligned`,
borderStyle === 'dashed' && 'mdx-timeline-item--border-dashed',
)}
{...props}
@@ -93,9 +111,12 @@ export const TimelineItem: React.FC = ({
- {period}
+ {formatPeriod(period)}