owncast/web/components/chat/ChatContainer/ScrollToBotBtn.tsx

31 lines
653 B
TypeScript
Raw Normal View History

2022-09-30 14:16:35 +03:00
import { Button } from 'antd';
import dynamic from 'next/dynamic';
import { FC } from 'react';
2022-09-30 14:16:35 +03:00
import styles from './ChatContainer.module.scss';
// Lazy loaded components
const VerticalAlignBottomOutlined = dynamic(
() => import('@ant-design/icons/VerticalAlignBottomOutlined'),
{
ssr: false,
},
);
2022-09-30 14:16:35 +03:00
type Props = {
onClick: () => void;
2022-09-30 14:16:35 +03:00
};
export const ScrollToBotBtn: FC<Props> = ({ onClick }) => (
2022-09-30 14:16:35 +03:00
<div className={styles.toBottomWrap}>
<Button
type="default"
style={{ color: 'currentColor' }}
icon={<VerticalAlignBottomOutlined />}
onClick={onClick}
2022-09-30 14:16:35 +03:00
>
Go to last message
</Button>
</div>
);