Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

Commit 9897041

Browse files
authored
Merge pull request #1331 from tidalcycles/BRANCH_NAME
Add Icon to import sample button
2 parents b5d48b2 + c48aba5 commit 9897041

File tree

1 file changed

+37
-20
lines changed

1 file changed

+37
-20
lines changed

website/src/repl/components/panel/ImportSoundsButton.jsx

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,42 @@ export default function ImportSoundsButton({ onComplete }) {
2020
});
2121

2222
return (
23-
<label
24-
style={{ alignItems: 'center' }}
25-
className="flex bg-background ml-2 pl-2 pr-2 max-w-[210px] rounded-md hover:opacity-50 whitespace-nowrap cursor-pointer"
26-
>
27-
<input
28-
disabled={isUploading}
29-
ref={fileUploadRef}
30-
id="audio_file"
31-
style={{ display: 'none' }}
32-
type="file"
33-
directory=""
34-
webkitdirectory=""
35-
multiple
36-
accept="audio/*, .wav, .mp3, .m4a, .flac, .aac, .ogg"
37-
onChange={() => {
38-
onChange();
39-
}}
40-
/>
41-
{isUploading ? 'importing...' : 'import sounds folder'}
42-
</label>
23+
<div>
24+
<label
25+
style={{ alignItems: 'center', borderColor: 'red', border: 1 }}
26+
className="flex bg-background p-4 w-fit rounded-xl hover:opacity-50 whitespace-nowrap cursor-pointer"
27+
>
28+
<svg
29+
xmlns="http://www.w3.org/2000/svg"
30+
fill="none"
31+
viewBox="0 0 24 24"
32+
strokeWidth={1.5}
33+
stroke="currentColor"
34+
className="size-6 mr-2"
35+
>
36+
<path
37+
strokeLinecap="round"
38+
strokeLinejoin="round"
39+
d="M7.5 7.5h-.75A2.25 2.25 0 0 0 4.5 9.75v7.5a2.25 2.25 0 0 0 2.25 2.25h7.5a2.25 2.25 0 0 0 2.25-2.25v-7.5a2.25 2.25 0 0 0-2.25-2.25h-.75m0-3-3-3m0 0-3 3m3-3v11.25m6-2.25h.75a2.25 2.25 0 0 1 2.25 2.25v7.5a2.25 2.25 0 0 1-2.25 2.25h-7.5a2.25 2.25 0 0 1-2.25-2.25v-.75"
40+
/>
41+
</svg>
42+
43+
<input
44+
disabled={isUploading}
45+
ref={fileUploadRef}
46+
id="audio_file"
47+
style={{ display: 'none' }}
48+
type="file"
49+
directory=""
50+
webkitdirectory=""
51+
multiple
52+
accept="audio/*, .wav, .mp3, .m4a, .flac, .aac, .ogg"
53+
onChange={() => {
54+
onChange();
55+
}}
56+
/>
57+
{isUploading ? 'importing...' : 'import sounds folder'}
58+
</label>
59+
</div>
4360
);
4461
}

0 commit comments

Comments
 (0)