Skip to content

Commit

Permalink
remove default margin from banner
Browse files Browse the repository at this point in the history
  • Loading branch information
Haberkamp committed Oct 2, 2024
1 parent cc754b9 commit 28f5cb1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/quiet-trains-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@shopware-ag/meteor-component-library": patch
---

remove default margin of banner component, hidden by future flag
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="mt-banner" :class="classes" role="banner">
<div :class="classes" role="banner">
<slot name="customIcon">
<mt-icon
v-if="!hideIcon"
Expand Down Expand Up @@ -36,6 +36,7 @@
import { computed } from "vue";
import MtIcon from "../../icons-media/mt-icon/mt-icon.vue";
import MtText from "@/components/content/mt-text/mt-text.vue";
import { useFutureFlags } from "@/composables/useFutureFlags";
const props = withDefaults(
defineProps<{
Expand Down Expand Up @@ -68,9 +69,13 @@ const bannerIcon = computed(() => {
return iconConfig[props.variant] || "solid-info-circle";
});
const future = useFutureFlags();
const classes = computed(() => [
"mt-banner",
`mt-banner--${props.variant}`,
{
"mt-banner--future-remove-default-margin": future.removeDefaultMargin,
"mt-banner--icon": !props.hideIcon,
"mt-banner--closable": props.closable,
},
Expand All @@ -97,6 +102,10 @@ const bodyClasses = computed(() => ({
}
}
.mt-banner--future-remove-default-margin {
margin-block-end: 0;
}
.mt-banner__title {
margin-block-end: 0;
}
Expand Down

0 comments on commit 28f5cb1

Please sign in to comment.