Skip to content

Commit

Permalink
Update close button
Browse files Browse the repository at this point in the history
  • Loading branch information
Androlax2 committed May 14, 2022
1 parent 1ba8cbb commit 43a9a97
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 5 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,41 @@ modal-popup.is-active {
opacity: 1;
}
modal-popup > div {
position: relative;
flex: 1;
max-width: 48rem;
margin: auto;
padding: 2.4rem;
background-color: #FFF;
}

/* Stylise le bouton de fermeture */
modal-popup button[data-dismiss] {
cursor: pointer;
position: absolute;
top: 0;
right: 0;
appearance: none;
background: none;
border: none;
padding: 0;
margin: 0;
width: 50px;
height: 50px;
}
modal-popup button[data-dismiss]::before,
modal-popup button[data-dismiss]::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 5px;
height: 20px;
background-color: #000;
transform: rotate(45deg) translate(-50%, -50%);
transform-origin: top left;
}
modal-popup button[data-dismiss]::after {
transform: rotate(-45deg) translate(-50%, -50%);
}
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antipodes-medical/modal-popup",
"version": "1.0.1",
"version": "1.0.2",
"main": "src/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
5 changes: 1 addition & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ class Modal extends HTMLElement {
aria-label="Close"
title="Close"
data-dismiss="dialog"
>
<span></span>
<span></span>
</button>
></button>
`;

this.innerHTML = button + this.innerHTML;
Expand Down

0 comments on commit 43a9a97

Please sign in to comment.