File tree Expand file tree Collapse file tree
packages/code-connect/components/DatePicker Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import 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
615figma . 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) ;
You can’t perform that action at this time.
0 commit comments