Skip to content

Commit

Permalink
fized a style related bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Super7000 committed Apr 10, 2024
1 parent 0167472 commit 9f87779
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/Components/Cards.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,11 @@ export const Card = memo(({
} else event.currentTarget.classList.add("active")
}, [canStayActiveMultipleCards])

let cardStyle = {}
if (showEditBtn) cardStyle = { position: "relative", top: "-20px" }

const innerCard = (
<div className={"card data " + className} onClick={(e) => {
cardClickHandler(e)
defaultClickHandler(e)
}} title={details} style={cardStyle}>
}} title={details}>
{compressText ? (details.length > 6 ? details.slice(0, 5) + ".." : details) : details}
</div>
)
Expand Down
6 changes: 5 additions & 1 deletion src/Style/Cards.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,12 @@
0 0 0px 6px dodgerblue;
}

.card-wrapper .edit-btn {
.card-wrapper {
position: relative;
}

.card-wrapper .edit-btn {
position: absolute;
float: right;
width: 20px;
height: 20px;
Expand Down

0 comments on commit 9f87779

Please sign in to comment.