Skip to content

Commit

Permalink
fix: ensure the authorize btn stays on the right
Browse files Browse the repository at this point in the history
  • Loading branch information
pedoch committed Nov 16, 2023
1 parent 058082e commit 9f8e5b6
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 13 deletions.
8 changes: 6 additions & 2 deletions src/core/components/layouts/base.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,12 @@ export default class BaseLayout extends React.Component {
{hasServers || hasSchemes || hasSecurityDefinitions ? (
<div className="scheme-container">
<Col className="schemes wrapper" mobile={12}>
{hasServers ? <ServersContainer /> : null}
{hasSchemes ? <SchemesContainer /> : null}
{hasServers || hasSchemes ? (
<div className="schemes-server-container">
{hasServers ? <ServersContainer /> : null}
{hasSchemes ? <SchemesContainer /> : null}
</div>
) : null}
{hasSecurityDefinitions ? <AuthorizeBtnContainer /> : null}
</Col>
</div>
Expand Down
44 changes: 33 additions & 11 deletions src/style/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -795,26 +795,48 @@

gap: 10px;

> label
/*
This wraps the servers or schemes selector
This was added to make sure the Authorize button is always on the right
And the servers or schemes selector is always on the left
*/
> .schemes-server-container
{
font-size: 12px;
font-weight: bold;

display: flex;
flex-direction: column;
flex-wrap: wrap;

margin: -20px 15px 0 0;
gap: 10px;

@include text_headline();

select
> label
{
min-width: 130px;
font-size: 12px;
font-weight: bold;

display: flex;
flex-direction: column;

text-transform: uppercase;
margin: -20px 15px 0 0;

@include text_headline();

select
{
min-width: 130px;

text-transform: uppercase;
}
}
}

/*
This checks if the schemes-server-container is not present and
aligns the authorize button to the right
*/
&:not(:has(.schemes-server-container))
{
justify-content: flex-end;
}

/*
Target Authorize Button in schemes wrapper
This was added here to fix responsiveness issues with the authorize button
Expand Down

0 comments on commit 9f8e5b6

Please sign in to comment.