File tree Expand file tree Collapse file tree 7 files changed +160
-0
lines changed
Expand file tree Collapse file tree 7 files changed +160
-0
lines changed Original file line number Diff line number Diff line change 1+ import figma from '@figma/code-connect' ;
2+ import { Avatar } from '../components/avatar' ;
3+
4+ figma . connect ( Avatar , '<FIGMA_LINK>?node-id=1-24' , {
5+ imports : [ "import { Avatar } from '@raystack/apsara'" ] ,
6+ props : {
7+ radius : figma . enum ( 'Radius' , {
8+ Small : 'small' ,
9+ Full : 'full'
10+ } ) ,
11+ size : figma . enum ( 'Size' , {
12+ '1' : 1 ,
13+ '2' : 2 ,
14+ '3' : 3 ,
15+ '4' : 4 ,
16+ '5' : 5 ,
17+ '6' : 6 ,
18+ '7' : 7 ,
19+ '8' : 8 ,
20+ '9' : 9 ,
21+ '10' : 10 ,
22+ '11' : 11 ,
23+ '12' : 12 ,
24+ '13' : 13
25+ } ) ,
26+ fallback : figma . string ( 'Initials' )
27+ } ,
28+ example : props => < Avatar { ...props } />
29+ } ) ;
Original file line number Diff line number Diff line change 1+ import figma from '@figma/code-connect' ;
2+ import { Badge } from '../components/badge' ;
3+
4+ figma . connect ( Badge , '<FIGMA_LINK>?node-id=3463-756' , {
5+ imports : [ "import { Badge } from '@raystack/apsara'" ] ,
6+ props : {
7+ variant : figma . enum ( 'Variant' , {
8+ Accent : 'accent' ,
9+ Warning : 'warning' ,
10+ Danger : 'danger' ,
11+ Success : 'success' ,
12+ Neutral : 'neutral' ,
13+ Gradient : 'gradient'
14+ } ) ,
15+ size : figma . enum ( 'Size' , {
16+ Micro : 'micro' ,
17+ Small : 'small' ,
18+ Regular : 'regular'
19+ } ) ,
20+ icon : figma . boolean ( 'Icon' , {
21+ true : figma . children ( 'Icon' ) ,
22+ false : undefined
23+ } ) ,
24+ children : figma . textContent ( 'Badge' )
25+ } ,
26+ example : ( { children, ...props } ) => < Badge { ...props } > { children } </ Badge >
27+ } ) ;
Original file line number Diff line number Diff line change 1+ import figma from '@figma/code-connect' ;
2+ import { Chip } from '../components/chip' ;
3+
4+ figma . connect ( Chip , '<FIGMA_LINK>?node-id=3388-602' , {
5+ imports : [ "import { Chip } from '@raystack/apsara'" ] ,
6+ props : {
7+ variant : figma . enum ( 'Variant' , {
8+ Filled : 'filled' ,
9+ Outline : 'outline'
10+ } ) ,
11+ size : figma . enum ( 'Size' , {
12+ Small : 'small' ,
13+ Large : 'large'
14+ } ) ,
15+ color : figma . enum ( 'Style' , {
16+ Neutral : 'neutral' ,
17+ Accent : 'accent'
18+ } ) ,
19+ structure : figma . nestedProps ( '.chip_structure' , {
20+ children : figma . boolean ( 'Label' , {
21+ true : figma . textContent ( 'Label' ) ,
22+ false : undefined
23+ } ) ,
24+ isDismissible : figma . boolean ( 'Dismiss' ) ,
25+ leadingIcon : figma . boolean ( 'Leading icon' , {
26+ true : figma . children ( 'Leading icon' ) ,
27+ false : undefined
28+ } ) ,
29+ trailingIcon : figma . boolean ( 'Trailing icon' , {
30+ true : figma . children ( 'Trailing icon' ) ,
31+ false : undefined
32+ } )
33+ } )
34+ } ,
35+ example : ( { structure, ...props } ) => (
36+ < Chip
37+ { ...props }
38+ leadingIcon = { structure . leadingIcon }
39+ trailingIcon = { structure . trailingIcon }
40+ isDismissible = { structure . isDismissible }
41+ >
42+ { structure . children }
43+ </ Chip >
44+ )
45+ } ) ;
Original file line number Diff line number Diff line change 1+ import figma from '@figma/code-connect' ;
2+ import { IconButton } from '../components/icon-button' ;
3+
4+ figma . connect ( IconButton , '<FIGMA_LINK>?node-id=627-576' , {
5+ imports : [ "import { IconButton } from '@raystack/apsara'" ] ,
6+ props : {
7+ size : figma . enum ( 'Size' , {
8+ '1' : 1 ,
9+ '2' : 2 ,
10+ '3' : 3 ,
11+ '4' : 4
12+ } ) ,
13+ disabled : figma . enum ( 'State' , {
14+ Disabled : true
15+ } ) ,
16+ children : figma . instance ( 'Icon' )
17+ } ,
18+ example : ( { children, ...props } ) => (
19+ < IconButton { ...props } > { children } </ IconButton >
20+ )
21+ } ) ;
Original file line number Diff line number Diff line change 1+ import figma from '@figma/code-connect' ;
2+ import { Indicator } from '../components/indicator' ;
3+
4+ figma . connect ( Indicator , '<FIGMA_LINK>?node-id=3472-3108' , {
5+ imports : [ "import { Indicator } from '@raystack/apsara'" ] ,
6+ props : {
7+ variant : figma . enum ( 'Variant' , {
8+ Accent : 'accent' ,
9+ Warning : 'warning' ,
10+ Danger : 'danger' ,
11+ Success : 'success' ,
12+ Neutral : 'neutral'
13+ } ) ,
14+ label : figma . boolean ( 'Label' , {
15+ true : figma . textContent ( '3' ) ,
16+ false : undefined
17+ } )
18+ } ,
19+ example : props => < Indicator { ...props } />
20+ } ) ;
Original file line number Diff line number Diff line change 1+ import figma from '@figma/code-connect' ;
2+ import { Spinner } from '../components/spinner' ;
3+
4+ figma . connect ( Spinner , '<FIGMA_LINK>?node-id=3073-10985' , {
5+ imports : [ "import { Spinner } from '@raystack/apsara'" ] ,
6+ props : { } ,
7+ example : props => < Spinner { ...props } />
8+ } ) ;
Original file line number Diff line number Diff line change 1+ import figma from '@figma/code-connect' ;
2+ import { Tooltip } from '../components/tooltip' ;
3+
4+ figma . connect ( Tooltip , '<FIGMA_LINK>?node-id=3598-25261' , {
5+ imports : [ "import { Tooltip } from '@raystack/apsara'" ] ,
6+ props : {
7+ message : figma . textContent ( 'Tooltip text' )
8+ } ,
9+ example : props => < Tooltip { ...props } > TOOLTIP_TRIGGER</ Tooltip >
10+ } ) ;
You can’t perform that action at this time.
0 commit comments