|
| 1 | +import {ReferenceEntityTemplateSchema} from '@shopify/generate-docs'; |
| 2 | + |
| 3 | +const data: ReferenceEntityTemplateSchema = { |
| 4 | + name: 'Link', |
| 5 | + description: |
| 6 | + 'This is an interactive component that directs users to a specified URL. It even supports custom protocols.', |
| 7 | + requires: '', |
| 8 | + thumbnail: 'link-thumbnail.png', |
| 9 | + isVisualComponent: true, |
| 10 | + type: '', |
| 11 | + definitions: [ |
| 12 | + { |
| 13 | + title: 'Link', |
| 14 | + description: '', |
| 15 | + type: 'Link', |
| 16 | + }, |
| 17 | + ], |
| 18 | + category: 'Components', |
| 19 | + subCategory: 'Actions', |
| 20 | + defaultExample: { |
| 21 | + image: 'link-default.png', |
| 22 | + codeblock: { |
| 23 | + title: 'Link to an app page', |
| 24 | + tabs: [ |
| 25 | + { |
| 26 | + title: 'React', |
| 27 | + code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/Link/examples/app-link.example.tsx', |
| 28 | + language: 'tsx', |
| 29 | + }, |
| 30 | + { |
| 31 | + title: 'JS', |
| 32 | + code: './examples/app-link.example.ts', |
| 33 | + language: 'js', |
| 34 | + }, |
| 35 | + ], |
| 36 | + }, |
| 37 | + }, |
| 38 | + examples: { |
| 39 | + description: '', |
| 40 | + examples: [ |
| 41 | + { |
| 42 | + description: 'Link to an external URL', |
| 43 | + image: 'external-link.png', |
| 44 | + codeblock: { |
| 45 | + tabs: [ |
| 46 | + { |
| 47 | + title: 'React', |
| 48 | + code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/Link/examples/external-link.example.tsx', |
| 49 | + language: 'typescript', |
| 50 | + }, |
| 51 | + { |
| 52 | + title: 'JS', |
| 53 | + code: './examples/external-link.example.ts', |
| 54 | + language: 'typescript', |
| 55 | + }, |
| 56 | + ], |
| 57 | + title: 'External Link', |
| 58 | + }, |
| 59 | + }, |
| 60 | + { |
| 61 | + description: 'Link to a relative URL', |
| 62 | + image: 'relative-link.png', |
| 63 | + codeblock: { |
| 64 | + tabs: [ |
| 65 | + { |
| 66 | + title: 'React', |
| 67 | + code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/Link/examples/relative-link.example.tsx', |
| 68 | + language: 'typescript', |
| 69 | + }, |
| 70 | + { |
| 71 | + title: 'JS', |
| 72 | + code: './examples/relative-link.example.ts', |
| 73 | + language: 'typescript', |
| 74 | + }, |
| 75 | + ], |
| 76 | + title: 'Relative Link', |
| 77 | + }, |
| 78 | + }, |
| 79 | + { |
| 80 | + description: 'Link to a Shopify admin page', |
| 81 | + image: 'shopify-section-link.png', |
| 82 | + codeblock: { |
| 83 | + tabs: [ |
| 84 | + { |
| 85 | + title: 'React', |
| 86 | + code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/Link/examples/shopify-section-link.example.tsx', |
| 87 | + language: 'typescript', |
| 88 | + }, |
| 89 | + { |
| 90 | + title: 'JS', |
| 91 | + code: './examples/shopify-section-link.example.ts', |
| 92 | + language: 'typescript', |
| 93 | + }, |
| 94 | + ], |
| 95 | + title: 'Shopify Section Link', |
| 96 | + }, |
| 97 | + }, |
| 98 | + ], |
| 99 | + }, |
| 100 | + related: [ |
| 101 | + { |
| 102 | + type: 'component', |
| 103 | + name: 'Button', |
| 104 | + url: '/docs/api/admin-extensions/components/actions/button', |
| 105 | + }, |
| 106 | + ], |
| 107 | +}; |
| 108 | + |
| 109 | +export default data; |
0 commit comments