Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: account switcher design #267

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
&--mobile {
width: 90vw;
position: unset;
min-height: 400px;
height: auto;
border-radius: 4px;
}
Expand Down
5 changes: 5 additions & 0 deletions src/components/AppLayout/AccountSwitcher/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ type AccountSwitcherProps = {
demo: string;
real: string;
};
modalContentStyle?: {
content?: React.CSSProperties;
};
};

export const AccountSwitcher = ({
Expand All @@ -39,6 +42,7 @@ export const AccountSwitcher = ({
isDisabled = false,
buttonClassName,
tabsLabels,
modalContentStyle,
}: AccountSwitcherProps) => {
const [isOpen, setIsOpen] = useState(false);
const ref = useRef(null);
Expand Down Expand Up @@ -110,6 +114,7 @@ export const AccountSwitcher = ({
}}
className="deriv-account-switcher__container--mobile"
isOpen={isOpen}
style={modalContentStyle ?? {}}
>
{children && (
<Tabs
Expand Down
1 change: 0 additions & 1 deletion src/components/Modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ interface ModalProps extends ReactModal.Props {
}
}


/**
* Represents a modal component.it's a wrapper around react-modal.
* you can use all props exposing from the react-modal.
Expand Down
Loading