Files
kakawa/src/components/PillButton.tsx
2024-09-27 01:00:12 +05:30

17 lines
414 B
TypeScript

import React from 'react';
import styles from './PillButton.module.css';
type PillButtonProps = {
text: string; // text prop is now required
onClick?: () => void; // onClick is optional
};
export function PillButton({ text, onClick }: PillButtonProps) {
return (
<button onClick={onClick} className={styles.pillButton}>
{text}
<span className={styles.arrow}></span>
</button>
);
}