@moises.ai/design-system 4.17.10 → 4.17.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -15,6 +15,7 @@ const ProjectItem = ({
|
|
|
15
15
|
loading = false,
|
|
16
16
|
failed = false,
|
|
17
17
|
children,
|
|
18
|
+
labels = {},
|
|
18
19
|
...props
|
|
19
20
|
}) => {
|
|
20
21
|
const {
|
|
@@ -102,14 +103,14 @@ const ProjectItem = ({
|
|
|
102
103
|
{allTracks.length === 0 && !loading && (
|
|
103
104
|
<Flex direction="row" gap="3" p="5" pt="2" align="center" justify="center">
|
|
104
105
|
<NoMusicIcon width={16} height={16} style={{ color: 'var(--neutral-alpha-10)' }} />
|
|
105
|
-
<Text size="2" style={{ color: 'var(--neutral-alpha-10)' }}>This file has no tracks</Text>
|
|
106
|
+
<Text size="2" style={{ color: 'var(--neutral-alpha-10)' }}>{labels.noTracks || 'This file has no tracks'}</Text>
|
|
106
107
|
</Flex>
|
|
107
108
|
)}
|
|
108
109
|
|
|
109
110
|
{loading && (
|
|
110
111
|
<Flex direction="row" gap="3" p="5" align="center" justify="center">
|
|
111
112
|
<Spinner width={16} height={16} style={{ color: 'var(--neutral-alpha-10)' }} />
|
|
112
|
-
<Text size="2" style={{ color: 'var(--neutral-alpha-10)' }}>Loading tracks
|
|
113
|
+
<Text size="2" style={{ color: 'var(--neutral-alpha-10)' }}>{labels.loading || 'Loading tracks...'}</Text>
|
|
113
114
|
</Flex>
|
|
114
115
|
)}
|
|
115
116
|
|
|
@@ -121,7 +122,7 @@ const ProjectItem = ({
|
|
|
121
122
|
<Button variant="ghost" color="gray" style={{ flex: '1' }}
|
|
122
123
|
onClick={handleInsertAllTracks}
|
|
123
124
|
>
|
|
124
|
-
<ArrowLeftIcon width={16} height={16} /> Insert all
|
|
125
|
+
<ArrowLeftIcon width={16} height={16} /> {labels.insertAll || 'Insert all'}
|
|
125
126
|
</Button>
|
|
126
127
|
|
|
127
128
|
{allTracks.length > 6 && (
|
|
@@ -129,7 +130,7 @@ const ProjectItem = ({
|
|
|
129
130
|
<Separator orientation="vertical" />
|
|
130
131
|
|
|
131
132
|
<Button variant="ghost" color="gray" style={{ flex: '1' }} onClick={handleClickShowAllTracks}>
|
|
132
|
-
{showAllTracks ? 'Show less' : 'Show more'}
|
|
133
|
+
{showAllTracks ? labels.showLess || 'Show less' : labels.showMore || 'Show more'}
|
|
133
134
|
{showAllTracks ? <ChevronUpIcon width={16} height={16} /> : <ChevronDownIcon width={16} height={16} />}
|
|
134
135
|
</Button>
|
|
135
136
|
</>
|
|
@@ -10,7 +10,8 @@ export const ProjectsList = ({
|
|
|
10
10
|
projects = [],
|
|
11
11
|
onClickTrack,
|
|
12
12
|
onInsertAllTracks,
|
|
13
|
-
onProjectClick
|
|
13
|
+
onProjectClick,
|
|
14
|
+
labels = {}
|
|
14
15
|
}) => {
|
|
15
16
|
const [openedItem, setOpenedItem] = useState(null)
|
|
16
17
|
|
|
@@ -27,7 +28,7 @@ export const ProjectsList = ({
|
|
|
27
28
|
>
|
|
28
29
|
<Flex direction="column" width="100%">
|
|
29
30
|
{projects.map((project) => (
|
|
30
|
-
<ProjectItem key={project.id} {...project}>
|
|
31
|
+
<ProjectItem key={project.id} {...project} labels={labels}>
|
|
31
32
|
{children}
|
|
32
33
|
</ProjectItem>
|
|
33
34
|
))}
|