File tree Expand file tree Collapse file tree
web-components/code-connect/link Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/**
2- * Copyright IBM Corp. 2016, 2024
2+ * Copyright IBM Corp. 2016, 2026
33 *
44 * This source code is licensed under the Apache-2.0 license found in the
55 * LICENSE file in the root directory of this source tree.
66 */
77
88import React from 'react' ;
99import { Link } from '@carbon/react' ;
10+ import type { ComponentType } from 'react' ;
1011import figma from '@figma/code-connect' ;
1112
1213figma . connect (
@@ -16,9 +17,10 @@ figma.connect(
1617 props : {
1718 inline : figma . enum ( 'Type' , {
1819 Inline : true ,
20+ Standalone : false ,
1921 } ) ,
2022 linkText : figma . string ( 'Link text' ) ,
21- renderIcon : figma . instance ( 'Swap icon' ) ,
23+ renderIcon : figma . instance < ComponentType > ( 'Swap icon' ) ,
2224 size : figma . enum ( 'Size' , {
2325 Large : 'lg' ,
2426 Medium : 'md' ,
Original file line number Diff line number Diff line change 1+ /**
2+ * Copyright IBM Corp. 2026
3+ *
4+ * This source code is licensed under the Apache-2.0 license found in the
5+ * LICENSE file in the root directory of this source tree.
6+ */
7+
8+ import figma , { html } from '@figma/code-connect/html' ;
9+
10+ figma . connect (
11+ 'https://www.figma.com/file/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?type=design&node-id=50111-991&mode=design&t=kyFCPK0tCeufcNP2-4' ,
12+ {
13+ props : {
14+ inline : figma . enum ( 'Type' , {
15+ Inline : true ,
16+ Standalone : false ,
17+ } ) ,
18+ linkText : figma . string ( 'Link text' ) ,
19+ renderIcon : figma . instance ( 'Swap icon' ) ,
20+ size : figma . enum ( 'Size' , {
21+ Large : 'lg' ,
22+ Medium : 'md' ,
23+ Small : 'sm' ,
24+ } ) ,
25+ disabled : figma . enum ( 'State' , {
26+ Disabled : true ,
27+ } ) ,
28+ } ,
29+ example : ( props ) =>
30+ html ` < cds-link
31+ inline =${ props . inline }
32+ size =${ props . size }
33+ disabled=${ props . disabled } >
34+ ${ props . linkText } ${ props . renderIcon }
35+ </ cds-link > ` ,
36+ imports : [ "import '@carbon/web-components/es/components/link/link.js'" ] ,
37+ }
38+ ) ;
You can’t perform that action at this time.
0 commit comments