UNPKG

treesap

Version:
5 lines 1.5 kB
import { jsx as _jsx, jsxs as _jsxs } from "hono/jsx/jsx-runtime"; export function VoiceRecorder({ id = "default" }) { return (_jsxs("sapling-island", { loading: "visible", children: [_jsx("template", { children: _jsx("script", { type: "module", src: "/components/VoiceRecorder.js" }) }), _jsxs("button", { id: `voice-recorder-${id}`, type: "button", class: "w-10 h-10 bg-black text-white rounded-full hover:bg-gray-800 transition-colors flex items-center justify-center", "aria-label": "Voice recording", children: [_jsxs("svg", { id: `mic-icon-${id}`, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", children: [_jsx("path", { d: "M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z" }), _jsx("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }), _jsx("line", { x1: "12", x2: "12", y1: "19", y2: "22" }), _jsx("line", { x1: "8", x2: "16", y1: "22", y2: "22" })] }), _jsx("svg", { id: `stop-icon-${id}`, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", style: "display: none;", children: _jsx("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }) }), _jsx("svg", { id: `loading-icon-${id}`, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", style: "display: none;", class: "animate-spin", children: _jsx("path", { d: "M21 12a9 9 0 11-6.219-8.56" }) })] })] })); } //# sourceMappingURL=VoiceRecorder.js.map