mirror of
https://github.com/owncast/owncast.git
synced 2024-12-18 23:32:51 +03:00
7c13a3fd01
* chore(deps): update dependency eslint-plugin-react to v7.33.0 * chore: have linter try to autofix and commit linter warnings * Linter fixes * chore: tweak how js formatting is run within actions * fix: type mismatch * Prettified Code! --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Gabe Kangas <gabek@real-ity.com> Co-authored-by: Owncast <owncast@owncast.online> Co-authored-by: gabek <gabek@users.noreply.github.com>
27 lines
606 B
TypeScript
27 lines
606 B
TypeScript
import { Button } from 'antd';
|
|
import { FC } from 'react';
|
|
import dynamic from 'next/dynamic';
|
|
import styles from './ActionButton/ActionButton.module.scss';
|
|
|
|
// Lazy loaded components
|
|
|
|
const BellFilled = dynamic(() => import('@ant-design/icons/BellFilled'), {
|
|
ssr: false,
|
|
});
|
|
|
|
export type NotifyButtonProps = {
|
|
text?: string;
|
|
onClick?: () => void;
|
|
};
|
|
|
|
export const NotifyButton: FC<NotifyButtonProps> = ({ onClick, text }) => (
|
|
<Button
|
|
type="primary"
|
|
className={styles.button}
|
|
icon={<BellFilled />}
|
|
onClick={onClick}
|
|
id="notify-button"
|
|
>
|
|
{text || 'Notify'}
|
|
</Button>
|
|
);
|