Skip to content

Commit

Permalink
Merge pull request #159 from perawallet/fix/remove-screen-size-condit…
Browse files Browse the repository at this point in the history
…ions

Remove screen size conditions
  • Loading branch information
yigitguler authored Nov 28, 2023
2 parents 054b66b + 7eae396 commit 0b02f7c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.3.3",
"version": "1.3.4",
"name": "@perawallet/connect",
"description": "JavaScript SDK for integrating Pera Wallet to web applications.",
"main": "dist/index.js",
Expand Down
3 changes: 1 addition & 2 deletions src/modal/PeraWalletConnectModal.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {isMobile} from "../util/device/deviceUtils";
import {isSmallScreen} from "../util/screen/screenSizeUtils";
import {
PERA_WALLET_CONNECT_MODAL_ID,
PERA_WALLET_MODAL_CLASSNAME
Expand Down Expand Up @@ -27,7 +26,7 @@ export class PeraWalletConnectModal extends HTMLElement {
peraWalletConnectModalClassNames = `${peraWalletConnectModalClassNames} ${PERA_WALLET_MODAL_CLASSNAME}--compact`;
}

if (isSmallScreen() && isMobile()) {
if (isMobile()) {
peraWalletConnectModal.innerHTML = `
<div class="${peraWalletConnectModalClassNames}">
<div class="pera-wallet-modal__body" part="body">
Expand Down
5 changes: 2 additions & 3 deletions src/modal/header/PeraWalletModalHeader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import CloseIcon from "../../asset/icon/Close.svg";
import CloseIconDark from "../../asset/icon/Close--dark.svg";

import styles from "./_pera-wallet-modal-header.scss";
import {isSmallScreen} from "../../util/screen/screenSizeUtils";
import {isMobile} from "../../util/device/deviceUtils";
import {
PERA_WALLET_REDIRECT_MODAL_ID,
Expand All @@ -19,7 +18,7 @@ const headerClassName = isMobile()
peraWalletModalHeader.innerHTML = `
<div class="${headerClassName}">
${
isSmallScreen() && isMobile()
isMobile()
? ""
: `<div class="pera-wallet-modal-header__brand">
<img src="${PeraConnectIcon}" />
Expand All @@ -38,7 +37,7 @@ peraWalletModalHeader.innerHTML = `
class="pera-wallet-button pera-wallet-modal-header__close-button">
<img
class="pera-wallet-modal-header__close-button__close-icon"
src="${isSmallScreen() && isMobile() ? CloseIconDark : CloseIcon}"
src="${isMobile() ? CloseIconDark : CloseIcon}"
/>
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import NoteIcon from "../../../asset/icon/Note.svg";
import PeraWalletWithText from "../../../asset/icon/PeraWallet--with-text.svg";
import PeraWalletLogo from "../../../asset/icon/PeraWallet.svg";

import {isSmallScreen} from "../../../util/screen/screenSizeUtils";
import styles from "./_pera-wallet-connect-modal-information-section.scss";
import {isMobile} from "../../../util/device/deviceUtils";

Expand Down Expand Up @@ -94,7 +93,7 @@ export class PeraWalletConnectModalInformationSection extends HTMLElement {
styleSheet
);

if (isSmallScreen() && isMobile()) {
if (isMobile()) {
this.shadowRoot
.getElementById("pera-wallet-connect-modal-information-section-title")
?.setAttribute("style", "display: none;");
Expand Down

0 comments on commit 0b02f7c

Please sign in to comment.