snort/src/Element/ShowMore.tsx

21 lines
454 B
TypeScript
Raw Normal View History

2023-02-06 21:42:47 +00:00
import './ShowMore.css'
interface ShowMoreProps {
text?: string
className?: string
onClick: () => void
}
const ShowMore = ({ text = "Show more", onClick, className = "" }: ShowMoreProps) => {
const classNames = className ? `show-more ${className}` : "show-more"
return (
<div className="show-more-container">
<button className={classNames} onClick={onClick}>
{text}
</button>
</div>
)
}
export default ShowMore