File tree Expand file tree Collapse file tree 6 files changed +14
-24
lines changed
packages/react-core/codeConnect/components Expand file tree Collapse file tree 6 files changed +14
-24
lines changed Original file line number Diff line number Diff line change 1- import React from 'react' ;
2- import { AboutModal } from 'src/components/AboutModal/AboutModal' ;
1+ import { AboutModal } from '@patternfly/react-core/dist/js/components/AboutModal' ;
32import figma from '@figma/code-connect' ;
43
54figma . connect (
65 AboutModal ,
7- 'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/branch/H3LonYnwH26v9zNEa2SXFk/ PatternFly-6%3A-Components?node-id=2879-13973&m=dev' ,
6+ 'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/ PatternFly-6%3A-Components-Test ?node-id=2879-13973&m=dev' ,
87 {
98 // reserve variables for mapping
109 // use props for Figma design file properties
1110 props : {
1211 productName : figma . string ( 'Product name' ) ,
12+
1313 // use `Content` ubiquitiously
14- figmaText : figma . textContent ( 'Content ')
14+ children : figma . children ( '* ')
1515 } ,
1616 example : ( props ) => (
1717 < AboutModal
@@ -20,8 +20,9 @@ figma.connect(
2020 brandImageSrc = "/assets/brand_image_src.jpg"
2121 productName = { props . productName }
2222 trademark = { 'Sample footer trademark text' }
23+ aria-label = "About modal"
2324 >
24- { props . figmaText }
25+ { props . children }
2526 </ AboutModal >
2627 )
2728 }
Original file line number Diff line number Diff line change 1- import React from 'react' ;
2- import { Avatar } from 'src/components/Avatar' ;
1+ import { Avatar } from '@patternfly/react-core/dist/js/components/Avatar' ;
32import figma from '@figma/code-connect/react' ;
43
54figma . connect (
@@ -22,6 +21,6 @@ figma.connect(
2221 figma . boolean ( 'Bordered' , { true : 'pf-m-bordered' , false : '' } )
2322 ] )
2423 } ,
25- example : ( props ) => < Avatar className = { props . className } />
24+ example : ( props ) => < Avatar alt = "Avatar image" className = { props . className } />
2625 }
2726) ;
Original file line number Diff line number Diff line change 1- import React from 'react' ;
21import { BackToTop } from 'src/components/BackToTop' ;
32import figma from '@figma/code-connect' ;
43
Original file line number Diff line number Diff line change 1- import React from 'react' ;
21import { BackgroundImage } from 'src/components/BackgroundImage' ;
32import figma from '@figma/code-connect' ;
43
@@ -14,12 +13,6 @@ figma.connect(
1413 BackgroundImage ,
1514 'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/branch/H3LonYnwH26v9zNEa2SXFk/PatternFly-6%3A-Components?node-id=2722-13543&t=7hKW0DzmfHGhNQnn-11' ,
1615 {
17- props : {
18- theme : figma . enum ( 'Theme' , {
19- 'On Primary' : 'on-primary' ,
20- 'On Secondary' : 'on-secondary'
21- } )
22- } ,
23- example : ( props ) => < BackgroundImage />
16+ example : ( ) => < BackgroundImage { ...props } />
2417 }
2518) ;
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ figma.connect(
8585 Custom : 'custom'
8686 } )
8787 } ,
88- example : ( props ) => < Banner / >
88+ example : ( props ) => < Banner > { props . figmaText } </ Banner >
8989 }
9090) ;
9191
@@ -119,6 +119,6 @@ figma.connect(
119119 Gray : 'gray'
120120 } )
121121 } ,
122- example : ( props ) => < Banner / >
122+ example : ( props ) => < Banner > { props . figmaText } </ Banner >
123123 }
124124) ;
Original file line number Diff line number Diff line change 1- import React from 'react' ;
2- import { Brand , BrandProps } from 'src/components/Brand' ;
1+ import { Brand } from 'src/components/Brand' ;
32import figma from '@figma/code-connect' ;
43
54/**
@@ -14,8 +13,7 @@ figma.connect(
1413 Brand ,
1514 'https://www.figma.com/design/VMEX8Xg2nzhBX8rfBx53jp/branch/H3LonYnwH26v9zNEa2SXFk/PatternFly-6%3A-Components?node-id=2104-3689&t=7hKW0DzmfHGhNQnn-11' ,
1615 {
17- props : { } ,
18- example : ( props ) => < Brand />
16+ example : ( ) => < Brand />
1917 }
2018) ;
2119
@@ -37,6 +35,6 @@ figma.connect(
3735 'Logo + Text' : 'logo---text'
3836 } )
3937 } ,
40- example : ( props ) => < Brand />
38+ example : ( ) => < Brand />
4139 }
4240) ;
You can’t perform that action at this time.
0 commit comments