mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
Support custom text in notify button
This commit is contained in:
parent
b973fbc2c0
commit
7788fe3327
@ -4,11 +4,12 @@ import { FC } from 'react';
|
||||
import styles from './ActionButton/ActionButton.module.scss';
|
||||
|
||||
export type NotifyButtonProps = {
|
||||
text?: string;
|
||||
onClick?: () => void;
|
||||
};
|
||||
|
||||
export const NotifyButton: FC<NotifyButtonProps> = ({ onClick }) => (
|
||||
export const NotifyButton: FC<NotifyButtonProps> = ({ onClick, text }) => (
|
||||
<Button type="primary" className={`${styles.button}`} icon={<BellFilled />} onClick={onClick}>
|
||||
Notify
|
||||
{text || 'Notify'}
|
||||
</Button>
|
||||
);
|
||||
|
@ -50,7 +50,7 @@ export const OfflineBanner: FC<OfflineBannerProps> = ({
|
||||
<div className={styles.footer}>
|
||||
{fediverseAccount && <FollowButton />}
|
||||
|
||||
{notificationsEnabled && <NotifyButton onClick={onNotifyClick} />}
|
||||
{notificationsEnabled && <NotifyButton text="Notify when live" onClick={onNotifyClick} />}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user