Merge pull request #1238 from Safelite/defect/CSR-1469
Moved Page Interaction Blocking class stuff into a prop
This commit is contained in:
commit
5a9ab3b565
2 changed files with 17 additions and 5 deletions
|
|
@ -25,8 +25,10 @@
|
||||||
<span v-if="!isLoaderDisplayed" class="m-0 button-auxillary-copy">{{
|
<span v-if="!isLoaderDisplayed" class="m-0 button-auxillary-copy">{{
|
||||||
badgeText
|
badgeText
|
||||||
}}</span>
|
}}</span>
|
||||||
<loader v-if="isLoaderDisplayed" :class="['left', 'no-block']" />
|
<loader
|
||||||
<!-- no-block allows the user to click between shops while availability indicators are loading -->
|
v-if="isLoaderDisplayed"
|
||||||
|
:loaderPosition="left"
|
||||||
|
:allowPageInteraction="true" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row-two">
|
<div class="row-two">
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,11 @@
|
||||||
class="loader"
|
class="loader"
|
||||||
role="alert"
|
role="alert"
|
||||||
aria-label="Loading new page"
|
aria-label="Loading new page"
|
||||||
v-bind:class="[this.loaderColor, this.loaderPosition]"></div>
|
v-bind:class="[
|
||||||
|
this.loaderColor,
|
||||||
|
this.loaderPosition,
|
||||||
|
this.allowPageInteraction ? 'allow-ui-interaction' : '',
|
||||||
|
]"></div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -19,6 +23,12 @@ export default {
|
||||||
loaderPosition: {
|
loaderPosition: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
|
/* Set to true for loaders where UI interaction must be allowed to continue while the loader is active
|
||||||
|
(See example shop-list-button) */
|
||||||
|
allowPageInteraction: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -83,8 +93,8 @@ export default {
|
||||||
&.black:after {
|
&.black:after {
|
||||||
background-color: $black;
|
background-color: $black;
|
||||||
}
|
}
|
||||||
//no-block to enable clicking on certain buttons with loaders while the loader is actives
|
&.allow-ui-interaction::before {
|
||||||
&.no-block::before {
|
//no-block to enable clicking on certain buttons with loaders while the loader is actives
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue