Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
Readmore inline
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiggr committed May 2, 2022
1 parent 997b71d commit 167e6ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ const ReadMore = ({ text, maxChars }) => {
<span className="readmore-container">
<p className="readmore-text">{more ? text : displayText}</p>
{showAction && (
<button className="readmore-action" onClick={() => setMore(!more)}>
<p
role="presentation"
className="readmore-action"
onClick={() => setMore(!more)}
>
{more ? 'Read less..' : 'Read more..'}
</button>
</p>
)}
</span>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,16 @@
font-size: 15px;

.readmore-text {
display: inline;
margin: 5px 0;
}

.readmore-action {
display: inline;
padding: 2px;
border: 2px solid transparent;
margin: 0;
margin-left: 10px;
background-color: transparent;
color: #025e37;
cursor: pointer;
Expand Down

0 comments on commit 167e6ed

Please sign in to comment.