@@ -3,7 +3,7 @@ import { Group, List, Select, Slot, Style, TextInput } from '@makeswift/runtime/
3
3
import { Accordion , AccordionItem } from '@/vibes/soul/primitives/accordion' ;
4
4
import { runtime } from '~/lib/makeswift/runtime' ;
5
5
6
- interface MSAccordion {
6
+ interface MSAccordionItem {
7
7
title : string ;
8
8
children : React . ReactNode ;
9
9
}
@@ -12,21 +12,21 @@ interface MSAccordionsProps {
12
12
className : string ;
13
13
type : 'single' | 'multiple' ;
14
14
colorScheme : 'light' | 'dark' ;
15
- accordions : MSAccordion [ ] ;
15
+ items : MSAccordionItem [ ] ;
16
16
}
17
17
18
18
runtime . registerComponent (
19
- function MSAccordions ( { className, accordions , colorScheme, type } : MSAccordionsProps ) {
19
+ function MSAccordion ( { className, items , colorScheme, type } : MSAccordionsProps ) {
20
20
return (
21
21
< Accordion
22
22
className = { className }
23
23
collapsible = { type === 'single' ? true : undefined }
24
24
type = { type }
25
25
>
26
- { accordions . length < 1 && (
27
- < div className = "p-4 text-center text-lg text-gray-400" > Add accordions </ div >
26
+ { items . length < 1 && (
27
+ < div className = "p-4 text-center text-lg text-gray-400" > Add accordion items </ div >
28
28
) }
29
- { accordions . map ( ( { title, children } , index ) => (
29
+ { items . map ( ( { title, children } , index ) => (
30
30
< AccordionItem
31
31
colorScheme = { colorScheme }
32
32
key = { index }
@@ -41,21 +41,21 @@ runtime.registerComponent(
41
41
} ,
42
42
{
43
43
type : 'primitive-accordions' ,
44
- label : 'Basic / Accordions ' ,
44
+ label : 'Basic / Accordion ' ,
45
45
icon : 'carousel' ,
46
46
props : {
47
47
className : Style ( ) ,
48
- accordions : List ( {
49
- label : 'Accordions ' ,
48
+ items : List ( {
49
+ label : 'Items ' ,
50
50
type : Group ( {
51
51
label : 'Accordion item' ,
52
52
props : {
53
- title : TextInput ( { label : 'Title' , defaultValue : 'This is an accordion title' } ) ,
53
+ title : TextInput ( { label : 'Title' , defaultValue : 'This is an item title' } ) ,
54
54
children : Slot ( ) ,
55
55
} ,
56
56
} ) ,
57
57
getItemLabel ( accordion ) {
58
- return accordion ?. title || 'Accordion ' ;
58
+ return accordion ?. title || 'Untitled item ' ;
59
59
} ,
60
60
} ) ,
61
61
type : Select ( {
0 commit comments