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 82557be
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 14 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: 32 additions & 12 deletions src/style/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -795,26 +795,46 @@

gap: 10px;

> label
{
font-size: 12px;
font-weight: bold;

/*
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{
display: flex;
flex-direction: column;

margin: -20px 15px 0 0;
flex-wrap: wrap;

@include text_headline();
gap: 10px;

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

display: flex;
flex-direction: column;

margin: -20px 15px 0 0;

@include text_headline();

select
{
min-width: 130px;

text-transform: uppercase;
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 82557be

Please sign in to comment.