17 lines
414 B
TypeScript
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>
|
|
);
|
|
}
|