open-nomad/ui/app/styles/components/two-step-button.scss
Buck Doyle 90ecbdf522
Add job version revert buttons (#10336)
This adds a Revert two-step button to the JobVersions component for
not-current versions, which redirects to the overview on success. It
checks the job version before and after reversion to mitigate the edge
case where reverting to an otherwise-identical version has no effect, as
discussed in #10337.

It uses existing facilities for handling other errors and disabling the
button when permissions are lacking.
2021-04-20 08:33:16 -05:00

50 lines
906 B
SCSS

.two-step-button {
display: inline-block;
vertical-align: middle;
position: relative;
font-size: $body-size;
line-height: 1;
&.has-inline-text {
display: inline-flex;
align-items: center;
button {
margin-left: 0.5ch;
}
.confirmation-text {
position: absolute;
left: auto;
right: 0;
top: auto;
margin-right: 100%;
}
}
&.has-fading-background .confirmation-text {
padding: 0.5rem 0 0.5rem 4rem;
background: linear-gradient(to left, white, white 90%, transparent 100%);
}
.confirmation-text {
position: absolute;
left: 0;
top: -1.5em;
font-size: $body-size;
line-height: 1;
font-weight: $weight-normal;
color: darken($grey-blue, 20%);
white-space: nowrap;
&.is-right-aligned {
left: auto;
right: 0;
}
&.inherit-color {
color: currentColor;
}
}
}