mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-29 00:05:01 +00:00
53 lines
1.2 KiB
TypeScript
53 lines
1.2 KiB
TypeScript
/**
|
|
* PushNotificationSettings Component
|
|
* Sound and desktop notification preferences
|
|
*/
|
|
|
|
import React from 'react';
|
|
|
|
interface PushNotificationSettingsProps {
|
|
soundEnabled: boolean;
|
|
desktopNotifications: boolean;
|
|
onSettingChange: (key: string, value: any) => void;
|
|
testId?: string;
|
|
}
|
|
|
|
export const PushNotificationSettings: React.FC<PushNotificationSettingsProps> = ({
|
|
soundEnabled,
|
|
desktopNotifications,
|
|
onSettingChange,
|
|
testId,
|
|
}) => {
|
|
return (
|
|
<div data-testid={testId}>
|
|
<h3 >Sound & Desktop</h3>
|
|
|
|
<div >
|
|
<label >
|
|
<input
|
|
type="checkbox"
|
|
checked={soundEnabled}
|
|
onChange={(e) => onSettingChange('soundEnabled', e.target.checked)}
|
|
/>
|
|
<span>Enable Sound</span>
|
|
</label>
|
|
<p >Play sound when notifications arrive</p>
|
|
</div>
|
|
|
|
<div >
|
|
<label >
|
|
<input
|
|
type="checkbox"
|
|
checked={desktopNotifications}
|
|
onChange={(e) => onSettingChange('desktopNotifications', e.target.checked)}
|
|
/>
|
|
<span>Desktop Notifications</span>
|
|
</label>
|
|
<p >Show browser desktop notifications</p>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default PushNotificationSettings;
|