import React, { useState } from 'react';
const STEM_ICONS = {
vocal: 'π€', backing_vocals: 'πΆ', drums: 'π₯', bass: 'πΈ',
guitar: 'πΈ', keyboard: 'πΉ', strings: 'π»', brass: 'πΊ',
woodwinds: 'πͺ', percussion: 'πͺ', synth: 'π', fx: 'β¨',
};
const StemModal = ({ stems, onClose }) => {
const [playingStem, setPlayingStem] = useState(null);
if (!stems || Object.keys(stems).length === 0) return null;
return (
e.stopPropagation()}>
12 Stems
κ° μ€ν
μ κ°λ³ μ¬μ λ° λ€μ΄λ‘λν μ μμ΅λλ€
{Object.entries(stems).map(([name, url]) => {
if (!url) return null;
const isPlaying = playingStem === name;
return (
{STEM_ICONS[name] || 'π΅'}
{name.replace(/_/g, ' ')}
β
{isPlaying && (
);
})}
);
};
export default StemModal;