Skip to content

Commit 0afb9e8

Browse files
committed
feat(CC-batch-5): review-athon 3 updated cal month
1 parent 4b5a3f1 commit 0afb9e8

1 file changed

Lines changed: 35 additions & 3 deletions

File tree

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,47 @@
11
import figma from '@figma/code-connect';
2-
import { CalendarMonth } from '@patternfly/react-core';
2+
import { CalendarMonth, CalendarMonthInlineProps, Title } from '@patternfly/react-core';
33

44
// Documentation for CalendarMonth can be found at https://www.patternfly.org/components/calendar-month
5+
const inlineProps: CalendarMonthInlineProps = {
6+
component: 'article',
7+
title: (
8+
<Title headingLevel="h4" id="favorite-date">
9+
Select your favorite date
10+
</Title>
11+
),
12+
ariaLabelledby: 'favorite-date'
13+
};
514

615
figma.connect(
716
CalendarMonth,
8-
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=7741-2677',
17+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=7958-136846',
918
{
1019
props: {
1120
date: '2025-06-16'
1221
},
13-
example: (props) => <CalendarMonth date={new Date(props.date)} onChange={() => {}} onMonthChange={() => {}} />
22+
example: (props) => (
23+
<CalendarMonth date={props.date} inlineProps={inlineProps} onChange={() => {}} onMonthChange={() => {}} />
24+
)
25+
}
26+
);
27+
28+
figma.connect(
29+
CalendarMonth,
30+
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=7958-136846',
31+
{
32+
variant: { Type: 'With date range' },
33+
props: {
34+
startDate: new Date(2020, 10, 11),
35+
endDate: new Date(2020, 10, 24)
36+
},
37+
example: (props) => (
38+
<CalendarMonth
39+
date={props.startDate}
40+
inlineProps={inlineProps}
41+
onChange={() => {}}
42+
onMonthChange={() => {}}
43+
rangeStart={props.endDate}
44+
/>
45+
)
1446
}
1547
);

0 commit comments

Comments
 (0)