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 Improve styling of sudo mode prompt in SS3 #14

Merged
Merged
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
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/dist/styles/bundle.css

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions client/src/bundles/bundle.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
// Bootstrap dependencies
@import '~bootstrap/scss/functions';
@import '~bootstrap/scss/variables';
@import '~bootstrap/scss/mixins';

// Framework variables
@import '../framework/admin/scss/themes/_default';

@import "../components/LoadingIndicator/LoadingIndicator";
@import "../containers/SudoMode/SudoMode";
@import "../styles/CMSLegacy";
14 changes: 9 additions & 5 deletions client/src/containers/SudoMode/SudoMode.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,16 +207,20 @@ const withSudoMode = (WrappedComponent) => {

if (loading) {
return (
<div className="sudo-mode alert alert-info">
<LoadingComponent block />
<div className="sudo-mode__container">
<div className="sudo-mode alert alert-info">
<LoadingComponent block />
</div>
</div>
);
}

return (
<div className="sudo-mode alert alert-info">
{ this.renderSudoModeNotice() }
{ showVerification && this.renderSudoModeVerification() }
<div className="sudo-mode__container">
<div className="sudo-mode alert alert-info">
{ this.renderSudoModeNotice() }
{ showVerification && this.renderSudoModeVerification() }
</div>
</div>
);
}
Expand Down
15 changes: 15 additions & 0 deletions client/src/styles/CMSLegacy.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,19 @@
margin-bottom: 0;
padding-bottom: 0;
}

.sudo-mode__container {
@import '~bootstrap/scss/reboot';
@import '~bootstrap/scss/alert';
@import '~bootstrap/scss/buttons';
@import '~bootstrap/scss/forms';
@import '~bootstrap/scss/input-group';

// Reset extra margin given to form groups
.form-group {
margin-bottom: 0;
}

max-width: $grid-x * 64;
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
},
"dependencies": {
"@silverstripe/react-injector": "^0.1.2",
"bootstrap": "^4.3.1",
"classnames": "^2.2.6",
"isomorphic-fetch": "^2.2.1",
"prop-types": "^15.7.2",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,11 @@ boolbase@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"

bootstrap@^4.3.1:
version "4.3.1"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.3.1.tgz#280ca8f610504d99d7b6b4bfc4b68cec601704ac"
integrity sha512-rXqOmH1VilAt2DyPzluTi2blhk17bO7ef+zLLPlWvG494pDxcM234pJ8wTc/6R40UWizAIIMgxjvxZg5kmsbag==

boxen@^1.2.1:
version "1.3.0"
resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b"
Expand Down