Skip to content

Commit

Permalink
fix: make modals responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
icfor committed Mar 7, 2024
1 parent 4721544 commit cd9aba7
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/features/core/components/common-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const CommonModal = ({ children, ...props }: Props) => {
minWidth: "100vw",
outline: "none",
overflow: "auto",
padding: "0",
pointerEvents: "none",
position: "fixed",
right: "auto",
Expand All @@ -56,7 +57,7 @@ const CommonModal = ({ children, ...props }: Props) => {
}}
>
<div
className="relative w-full"
className="relative w-full overflow-auto px-[16px] py-[40px] md:p-[50px]"
style={{
backgroundColor: "#000",
borderRadius: "48px",
Expand All @@ -68,7 +69,6 @@ const CommonModal = ({ children, ...props }: Props) => {
margin: "auto",
maxWidth: "100vw",
outline: "none",
padding: "50px",
pointerEvents: "auto",
position: "relative",
width: "min-content",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const CancelUnstakingModal = () => {
stakingRef.staking.dispatch(setModalOpened(null));
}}
>
<div className="min-w-[390px]">{content}</div>
<div className="min-w-[90vw] md:min-w-[390px]">{content}</div>
</CommonModal>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/features/staking/components/modals/rewards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const RewardsModal = () => {
stakingRef.staking.dispatch(setModalOpened(null));
}}
>
<div className="min-w-[390px]">{content}</div>
<div className="min-w-[90vw] md:min-w-[390px]">{content}</div>
</CommonModal>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/features/staking/components/modals/staking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const StakingModal = () => {
stakingRef.staking.dispatch(setModalOpened(null));
}}
>
<div className="min-w-[390px]">
<div className="min-w-[90vw] md:min-w-[390px]">
{(() => {
const getStakingSummary = () => (
<>
Expand Down
2 changes: 1 addition & 1 deletion src/features/staking/components/modals/unstaking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const UnstakingModal = () => {
stakingRef.staking.dispatch(setModalOpened(null));
}}
>
<div className="min-w-[390px]">
<div className="min-w-[90vw] md:min-w-[390px]">
{(() => {
const getUnstakingSummary = () => (
<>
Expand Down
2 changes: 1 addition & 1 deletion src/features/staking/components/validator-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default function ValidatorPage() {
borderRadius: 16,
}}
>
<div className="flex w-full flex-row items-center gap-[16px]">
<div className="flex w-full min-w-[1000px] flex-row items-center gap-[16px]">
<img
alt="Validator logo"
className="block w-[80px] rounded-full"
Expand Down

0 comments on commit cd9aba7

Please sign in to comment.