snort/src/Element/ShowMore.tsx

25 lines
469 B
TypeScript
Raw Normal View History

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