Sticky permissions overview header (#12704)

* Sticky permissions overview header

* refactor to script setup

* add header bar height as css variable
This commit is contained in:
Azri Kahar
2022-04-13 22:33:15 +08:00
committed by GitHub
parent 3e539d16d9
commit 74c718c684
4 changed files with 8 additions and 10 deletions

View File

@@ -9,22 +9,19 @@
</div>
</template>
<script lang="ts">
<script lang="ts" setup>
import { useI18n } from 'vue-i18n';
import { defineComponent } from 'vue';
export default defineComponent({
setup() {
const { t } = useI18n();
return { t };
},
});
const { t } = useI18n();
</script>
<style lang="scss" scoped>
.permissions-overview-header {
--v-icon-color: var(--foreground-subdued);
position: sticky;
top: calc(var(--header-bar-height) - 1px); // minus 1px to avoid gaps
z-index: 4;
display: flex;
padding: 12px;
background-color: var(--background-input);