File tree Expand file tree Collapse file tree 3 files changed +41
-23
lines changed
docs/starter-template/components Expand file tree Collapse file tree 3 files changed +41
-23
lines changed Original file line number Diff line number Diff line change @@ -8,16 +8,6 @@ Accordion is a React component that creates an expandable and collapsible accord
88
99The accordion can contain any markdown content you wish to display.
1010
11- ``` jsx
12-
13-
14- function MyComponent () {
15- return (
16- < component name= " DevDocsAccordion" original= " PERldkRvY3NBY2NvcmRpb24gdGl0bGU9IlNlY3Rpb24gVGl0bGUiPgogICAgICB7LyogWW91ciBjb250ZW50IGhlcmUgKi99CiAgICA8L0RldkRvY3NBY2NvcmRpb24+" props= " eyJ0aXRsZSI6IlNlY3Rpb24gVGl0bGUiLCJjaGlsZHJlbiI6InsvKiBZb3VyIGNvbnRlbnQgaGVyZSAqL30ifQ==" >< / component>
17- );
18- }
19- ```
20-
2111## Parameters
2212
2313* ` title ` (string, required): The text to display as the accordion's header.
@@ -33,13 +23,15 @@ Accordion returns a React component that renders an accordion UI element.
3323### Basic Usage
3424
3525``` jsx
36- < component name= " DevDocsAccordion" original= " PERldkRvY3NBY2NvcmRpb24gdGl0bGU9IkdldHRpbmcgU3RhcnRlZCI+CiAgPHA+VGhpcyBpcyB0aGUgY29udGVudCBvZiB0aGUgYWNjb3JkaW9uLiBJdCBjYW4gaW5jbHVkZSBhbnkgdmFsaWQgSlNYLjwvcD4KPC9EZXZEb2NzQWNjb3JkaW9uPg==" props= " eyJ0aXRsZSI6IkdldHRpbmcgU3RhcnRlZCIsImNoaWxkcmVuIjoiPHA+VGhpcyBpcyB0aGUgY29udGVudCBvZiB0aGUgYWNjb3JkaW9uLiBJdCBjYW4gaW5jbHVkZSBhbnkgdmFsaWQgSlNYLjwvcD4ifQ==" >< / component>
37- ```
38-
39- ### With Multiple Paragraphs
40-
41- ``` jsx
42- < component name= " DevDocsAccordion" original= " PERldkRvY3NBY2NvcmRpb24gdGl0bGU9IkFkdmFuY2VkIFRvcGljcyI+CiAgPHA+Rmlyc3QgcGFyYWdyYXBoIG9mIGNvbnRlbnQuPC9wPgogIDxwPlNlY29uZCBwYXJhZ3JhcGggd2l0aCBtb3JlIGRldGFpbHMuPC9wPgogIDx1bD4KICAgIDxsaT5MaXN0IGl0ZW0gMTwvbGk+CiAgICA8bGk+TGlzdCBpdGVtIDI8L2xpPgogIDwvdWw+CjwvRGV2RG9jc0FjY29yZGlvbj4=" props= " eyJ0aXRsZSI6IkFkdmFuY2VkIFRvcGljcyIsImNoaWxkcmVuIjoiPHA+Rmlyc3QgcGFyYWdyYXBoIG9mIGNvbnRlbnQuPC9wPlxuICA8cD5TZWNvbmQgcGFyYWdyYXBoIHdpdGggbW9yZSBkZXRhaWxzLjwvcD5cbiAgPHVsPlxuICAgIDxsaT5MaXN0IGl0ZW0gMTwvbGk+XG4gICAgPGxpPkxpc3QgaXRlbSAyPC9saT5cbiAgPC91bD4ifQ==" >< / component>
26+ < Accordion title= " Click me to expand" >
27+ This is the content that will be shown when the accordion is expanded.
28+
29+ You can include any markdown content here.
30+ - List items
31+ - More items
32+
33+ Or even code blocks!
34+ < / Accordion>
4335```
4436
4537## Notes or Considerations
Original file line number Diff line number Diff line change @@ -16,9 +16,35 @@ The Tabs component and its subcomponents accept the following props:
1616
1717Here's a basic example of how to use the Tabs component:
1818
19- ``` jsx
20- < component name= " Tabs" original= " PFRhYnMgZGVmYXVsdFZhbHVlPSJ0YWIxIj4KICA8VGFic0xpc3Q+CiAgICA8VGFic1RyaWdnZXIgdmFsdWU9InRhYjEiPlRhYiAxPC9UYWJzVHJpZ2dlcj4KICAgIDxUYWJzVHJpZ2dlciB2YWx1ZT0idGFiMiI+VGFiIDI8L1RhYnNUcmlnZ2VyPgogIDwvVGFic0xpc3Q+CiAgPFRhYnNDb250ZW50IHZhbHVlPSJ0YWIxIj5Db250ZW50IGZvciBUYWIgMTwvVGFic0NvbnRlbnQ+CiAgPFRhYnNDb250ZW50IHZhbHVlPSJ0YWIyIj5Db250ZW50IGZvciBUYWIgMjwvVGFic0NvbnRlbnQ+CjwvVGFicz4=" props= " eyJkZWZhdWx0VmFsdWUiOiJ0YWIxIiwiY2hpbGRyZW4iOiI8VGFic0xpc3Q+XG4gICAgPFRhYnNUcmlnZ2VyIHZhbHVlPVwidGFiMVwiPlRhYiAxPC9UYWJzVHJpZ2dlcj5cbiAgICA8VGFic1RyaWdnZXIgdmFsdWU9XCJ0YWIyXCI+VGFiIDI8L1RhYnNUcmlnZ2VyPlxuICA8L1RhYnNMaXN0PlxuICA8VGFic0NvbnRlbnQgdmFsdWU9XCJ0YWIxXCI+Q29udGVudCBmb3IgVGFiIDE8L1RhYnNDb250ZW50PlxuICA8VGFic0NvbnRlbnQgdmFsdWU9XCJ0YWIyXCI+Q29udGVudCBmb3IgVGFiIDI8L1RhYnNDb250ZW50PiJ9" >< / component>
21- ```
19+ ```` jsx
20+ < Tabs defaultValue= " preview" >
21+ < TabsList>
22+ < TabsTrigger value= " preview" > Preview< / TabsTrigger>
23+ < TabsTrigger value= " code" > Code< / TabsTrigger>
24+ < / TabsList>
25+ < TabsContent value= " preview" >
26+ < div className= " p-4 border rounded" >
27+ A simple tabs example showing how the component works.
28+ < / div>
29+ < / TabsContent>
30+ < TabsContent value= " code" >
31+ ` ` ` jsx
32+ <Tabs defaultValue="tab1">
33+ <TabsList>
34+ <TabsTrigger value="tab1">Tab 1</TabsTrigger>
35+ <TabsTrigger value="tab2">Tab 2</TabsTrigger>
36+ </TabsList>
37+ <TabsContent value="tab1">
38+ Content for tab 1
39+ </TabsContent>
40+ <TabsContent value="tab2">
41+ Content for tab 2
42+ </TabsContent>
43+ </Tabs>
44+ ` ` `
45+ < / TabsContent>
46+ < / Tabs>
47+ ````
2248
2349## Notes or Considerations
2450
Original file line number Diff line number Diff line change 1-
2-
3- # Using the CodeSnippet Component
1+ # Using the CodeSnippet Component
42
53The ` CodeSnippet ` component is a powerful tool for displaying multiple code examples in a tabbed interface within your documentation. It's particularly useful when you need to show code snippets in different languages or file types for the same concept.
64
75## Basic Usage
86
97To use the ` CodeSnippet ` component, wrap your code blocks with it in your MDX file:
108
9+ ````
1110<CodeSnippets>
1211```javascript::example.js
1312const greeting = "Hello, world!";
@@ -18,6 +17,7 @@ greeting = "Hello, world!"
1817print(greeting)
1918```
2019</CodeSnippets>
20+ ````
2121
2222## Syntax
2323
You can’t perform that action at this time.
0 commit comments