Skip to content

Commit

Permalink
fix(actionBar): style
Browse files Browse the repository at this point in the history
  • Loading branch information
dimakorzhovnik committed May 29, 2024
1 parent 17c21ed commit a503f8c
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 14 deletions.
39 changes: 31 additions & 8 deletions front/src/components/ActionBar/ActionBar.module.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
.wrapper {
z-index: 1;
position: fixed;
bottom: 0;
.ActionBarContainer {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
position: fixed;
bottom: 0px;
left: 0;
gap: 0 20px;
padding: 0 10%;
right: 0;
}
padding: 10px 0;
background: linear-gradient(0deg,
rgba(0, 0, 0, 0.93) 96%,
rgba(0, 0, 0, 0) 100%);
z-index: 2;

&Content {
max-width: 1000px;
flex-grow: 1;
display: flex;
align-items: center;
gap: 25px;
justify-content: center;
position: relative;
padding: 0 70px;
padding-bottom: 10px;
}

@media (max-width: 540px) {
&Content {
flex-direction: column;
align-items: center;
text-align: center;
}
}
}
8 changes: 6 additions & 2 deletions front/src/components/ActionBar/ActionBar.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import React from "react";
import styles from "./ActionBar.module.scss";

function ActionBar({ children }) {
return <div className={styles.wrapper}>{children}</div>;
return (
<div className={styles.ActionBarContainer}>
<div className={styles.ActionBarContainerContent}>{children}</div>
</div>
);
}


export default ActionBar;
4 changes: 3 additions & 1 deletion front/src/components/MainContainer/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@

@media (max-width: 540px) {
width: 100% !important;
padding-left: 5px;
padding-right: 5px;
}
}

.noMaxWidth {
max-width: unset;
}
}
3 changes: 2 additions & 1 deletion front/src/pages/Main/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import MusicalAddress from "@/components/MusicalAddress/MusicalAddress";
import Passport from "./Passport/Passport";
import ActionBar from "@/components/ActionBar/ActionBar";
import { sendProof } from "@/api/cyber";
import { trimString } from "@/utils/trimString";

const tele = (window as any).Telegram.WebApp;

Expand Down Expand Up @@ -169,7 +170,7 @@ const Main = () => {
} else if (step === Steps.ADD_PASSPORT) {
actionBarContent = (
<>
your passport is {passport?.owner}
your passport is {trimString(passport?.owner)}
<TonWallet nickname={nickname} type="passport" />
{passportProof && (
<div
Expand Down
4 changes: 2 additions & 2 deletions front/src/utils/trimString.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const trimString = (address, firstArg, secondArg) => {
const first = firstArg || 3;
const second = secondArg || 8;
const first = firstArg || 11;
const second = secondArg || 4;

if (address && address.length > 11) {
return `${address.substring(0, first)}...${address.substring(
Expand Down

0 comments on commit a503f8c

Please sign in to comment.