feat(ui): add Button, Modal, Spinner, Toast, and Tooltip components with styles
All checks were successful
Build and Release / build-and-release (push) Successful in 13m12s
All checks were successful
Build and Release / build-and-release (push) Successful in 13m12s
- Implemented Button component with various props for customization. - Created Modal component with header, content, and footer subcomponents. - Added Spinner component for loading indicators. - Developed Toast component for displaying notifications. - Introduced Tooltip component for contextual hints with keyboard shortcuts. - Added corresponding CSS modules for styling each component. - Updated index file to export new components. - Configured TypeScript settings for the UI package.
This commit is contained in:
20
packages/shared/src/components/voice/SignalStrengthIcon.tsx
Normal file
20
packages/shared/src/components/voice/SignalStrengthIcon.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import { CellSignalFull, CellSignalMedium, CellSignalLow, CellSignalSlash } from '@phosphor-icons/react';
|
||||
import { ConnectionQuality } from 'livekit-client';
|
||||
|
||||
interface SignalStrengthIconProps {
|
||||
quality: ConnectionQuality;
|
||||
size?: number;
|
||||
}
|
||||
|
||||
export function SignalStrengthIcon({ quality, size = 18 }: SignalStrengthIconProps) {
|
||||
if (quality === ConnectionQuality.Excellent) {
|
||||
return <CellSignalFull size={size} weight="bold" color="var(--voice-status-success)" />;
|
||||
}
|
||||
if (quality === ConnectionQuality.Good) {
|
||||
return <CellSignalMedium size={size} weight="bold" color="var(--voice-status-warning)" />;
|
||||
}
|
||||
if (quality === ConnectionQuality.Poor) {
|
||||
return <CellSignalLow size={size} weight="bold" color="var(--voice-status-danger)" />;
|
||||
}
|
||||
return <CellSignalSlash size={size} weight="bold" color="var(--voice-text-subtle)" />;
|
||||
}
|
||||
Reference in New Issue
Block a user