mirror of
https://github.com/fleetdm/fleet
synced 2026-05-18 14:38:53 +00:00
relates to #20617 Adds disabled overlay to the other workflows modal on the policy page. This required a change to the modal component to render this new overlay and make that accessible to the consumer via a `isContentDisabled` prop  Also there are improvements to the my Add policy modal. It seemed to not work with the new modal HTML structure so I fixed and improved how its handling its scrollable content. > NOTE: I did my own manual regression testing to make sure all the modals still looked and worked properly but please tell me if you see one that does not. - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files) for more information. - [x] Manual QA for all new/changed functionality
120 lines
2.2 KiB
SCSS
120 lines
2.2 KiB
SCSS
.modal {
|
|
&__background {
|
|
@include position(fixed, 0 0 0 0);
|
|
background-color: rgba($core-fleet-black, 0.4);
|
|
z-index: 101;
|
|
overflow: auto;
|
|
display: flex;
|
|
justify-content: center;
|
|
animation: fade-in 150ms ease-out;
|
|
}
|
|
|
|
&__hidden {
|
|
visibility: hidden;
|
|
.fleet-checkbox__tick:after {
|
|
visibility: hidden;
|
|
}
|
|
}
|
|
|
|
&__content-wrapper {
|
|
margin-top: $pad-large;
|
|
font-size: $x-small;
|
|
|
|
.input-field {
|
|
width: 100%;
|
|
|
|
&::placeholder {
|
|
font-size: $x-small;
|
|
font-style: italic;
|
|
line-height: 24px;
|
|
}
|
|
}
|
|
|
|
form .modal-cta-wrap,
|
|
.form .modal-cta-wrap {
|
|
// compensate for form gap to maintain consistent 32px spacing on top of modal ctas
|
|
margin-top: $pad-small;
|
|
}
|
|
|
|
.modal-cta-wrap {
|
|
align-self: flex-end;
|
|
display: flex;
|
|
flex-direction: row-reverse;
|
|
margin-top: $pad-xlarge;
|
|
gap: $pad-medium;
|
|
}
|
|
}
|
|
|
|
&__ex {
|
|
text-decoration: none;
|
|
|
|
&:hover {
|
|
.icon {
|
|
svg {
|
|
path {
|
|
stroke: $core-vibrant-blue;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.button {
|
|
padding: $pad-small;
|
|
}
|
|
}
|
|
|
|
&__header {
|
|
font-size: $large;
|
|
font-weight: $regular;
|
|
text-align: left;
|
|
padding-bottom: $pad-xsmall;
|
|
border-bottom: 1px solid $ui-fleet-black-10;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
|
|
span {
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
}
|
|
}
|
|
|
|
&__modal_container {
|
|
@include position(absolute, 22px null null null);
|
|
box-sizing: border-box;
|
|
background-color: $core-white;
|
|
padding: $pad-xxlarge;
|
|
border-radius: 8px;
|
|
animation: scale-up 150ms ease-out;
|
|
|
|
&__medium {
|
|
width: 650px;
|
|
}
|
|
&__large {
|
|
width: 800px;
|
|
}
|
|
&__xlarge {
|
|
width: 850px;
|
|
}
|
|
&__auto {
|
|
width: auto;
|
|
}
|
|
}
|
|
|
|
// these styles are for the modal content when it is disabled
|
|
&__content-wrapper-disabled {
|
|
position: relative;
|
|
}
|
|
|
|
&__content-disabled {
|
|
transition: opacity 150ms ease-in-out;
|
|
opacity: 0.5; // this adds a disabled effect to the modal content
|
|
}
|
|
|
|
&__disabled-overlay {
|
|
position: absolute;
|
|
height: 100%;
|
|
width: 100%;
|
|
z-index: 1000;
|
|
}
|
|
}
|