more Element subdirectories

This commit is contained in:
Martti Malmi
2023-09-28 12:26:10 +03:00
parent 3b4f17dddf
commit 8b9f55493e
113 changed files with 143 additions and 143 deletions

View File

@ -0,0 +1,25 @@
import "./ShowMore.css";
import { useIntl } from "react-intl";
import messages from "../messages";
interface ShowMoreProps {
text?: string;
className?: string;
onClick: () => void;
}
const ShowMore = ({ text, onClick, className = "" }: ShowMoreProps) => {
const { formatMessage } = useIntl();
const defaultText = formatMessage(messages.ShowMore);
const classNames = className ? `show-more ${className}` : "show-more";
return (
<div className="show-more-container">
<button className={classNames} onClick={onClick}>
{text || defaultText}
</button>
</div>
);
};
export default ShowMore;