mirror of
				https://github.com/owncast/owncast.git
				synced 2025-11-04 13:27:21 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
		
			647 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			647 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import { Button, ButtonProps } from 'antd';
 | 
						|
 | 
						|
import { FC } from 'react';
 | 
						|
import dynamic from 'next/dynamic';
 | 
						|
import styles from './ActionButton/ActionButton.module.scss';
 | 
						|
 | 
						|
// Lazy loaded components
 | 
						|
 | 
						|
const HeartFilled = dynamic(() => import('@ant-design/icons/HeartFilled'), {
 | 
						|
  ssr: false,
 | 
						|
});
 | 
						|
 | 
						|
export type FollowButtonProps = ButtonProps & {
 | 
						|
  onClick?: () => void;
 | 
						|
  props?: ButtonProps;
 | 
						|
};
 | 
						|
 | 
						|
export const FollowButton: FC<FollowButtonProps> = ({ onClick, props }) => (
 | 
						|
  <Button
 | 
						|
    {...props}
 | 
						|
    type="primary"
 | 
						|
    className={styles.button}
 | 
						|
    icon={<HeartFilled />}
 | 
						|
    onClick={onClick}
 | 
						|
    id="follow-button"
 | 
						|
  >
 | 
						|
    Follow
 | 
						|
  </Button>
 | 
						|
);
 |