Skip to content

Commit

Permalink
style(new posts button): improve design
Browse files Browse the repository at this point in the history
  • Loading branch information
plebeius-eth committed Sep 9, 2024
1 parent 2295599 commit 8952f42
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 28 deletions.
26 changes: 2 additions & 24 deletions src/components/newer-posts-button/newer-posts-button.module.css
Original file line number Diff line number Diff line change
@@ -1,43 +1,21 @@
.newerPostsButton {
position: fixed;
left: 10%;
border-radius: 25px;
background-color: green;
color: white;
z-index: 5;
transition: top 0.3s ease-in-out;
font-size: 13px;
}

.resetButton {
display: inline-block;
display: inline-block;
cursor: pointer;
font-weight: 700;
padding: 5px 10px;
}

.resetButton:hover {
opacity: 0.8;
}

.hide {
display: none;
}

.hideButton {
display: inline-block;
cursor: pointer;
background-image: url("/public/assets/buttons/close-x-button.png");
background-size: cover;
height: 12px;
width: 12px;
transform: translateY(1px);
}

.hideButtonWrapper {
padding-right: 10px;
}

.hideButton:hover {
opacity: 0.8;
padding: 0px 3px;
}
10 changes: 6 additions & 4 deletions src/components/newer-posts-button/newer-posts-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ const NewerPostsButton = ({ reset, subplebbitAddressesWithNewerPosts }: NewerPos

return (
<div className={`${styles.newerPostsButton} ${!hide && styles.show} ${hide && styles.hide}`} style={{ top: `${buttonPosition}px` }}>
<span className={styles.resetButton} onClick={handleNewerPostsButtonClick}>
Newer Posts
</span>
<button className={styles.resetButton} onClick={handleNewerPostsButtonClick}>
↑ new posts
</button>
<span className={styles.hideButtonWrapper}>
<span className={styles.hideButton} onClick={() => setHideButton(true)} />
<button className={styles.hideButton} onClick={() => setHideButton(true)}>
x
</button>
</span>
</div>
);
Expand Down

0 comments on commit 8952f42

Please sign in to comment.