2022-10-25 08:18:50 +02:00
|
|
|
<!--
|
|
|
|
Copyright: Ankitects Pty Ltd and contributors
|
|
|
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
-->
|
|
|
|
<script lang="ts">
|
2022-11-02 12:47:07 +01:00
|
|
|
const rtl: boolean = window.getComputedStyle(document.body).direction == "rtl";
|
|
|
|
|
2022-10-25 08:18:50 +02:00
|
|
|
export let grow = true;
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div
|
|
|
|
class="config-input position-relative justify-content-end"
|
|
|
|
class:flex-grow-1={grow}
|
|
|
|
>
|
2023-12-08 05:32:04 +01:00
|
|
|
<div class="revert" class:rtl>
|
2022-10-25 08:18:50 +02:00
|
|
|
<slot name="revert" />
|
|
|
|
</div>
|
|
|
|
<slot />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
.revert {
|
|
|
|
position: absolute;
|
2023-12-08 05:32:04 +01:00
|
|
|
right: -1.7em;
|
|
|
|
bottom: -1px;
|
2022-10-25 08:18:50 +02:00
|
|
|
color: var(--fg-faint);
|
2022-11-02 12:47:07 +01:00
|
|
|
&.rtl {
|
|
|
|
right: unset;
|
2023-12-11 00:20:10 +01:00
|
|
|
left: -1.7em;
|
2022-11-02 12:47:07 +01:00
|
|
|
}
|
2022-10-25 08:18:50 +02:00
|
|
|
}
|
|
|
|
.config-input {
|
|
|
|
&:hover,
|
|
|
|
&:focus-within {
|
|
|
|
.revert {
|
|
|
|
color: var(--fg-subtle);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.revert:hover {
|
|
|
|
color: var(--fg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|