Skip to content

Commit

Permalink
Remove mt external link (#373)
Browse files Browse the repository at this point in the history
* delete component files

* remove component references

* replace mt-external-link with mt-link for mt-empty-state

* style:add flex column
  • Loading branch information
alastair-simon authored Nov 29, 2024
1 parent 67a0b67 commit 46677ef
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 254 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ body {
}

/* style inline external links */
a[target="_blank"]:not(.mt-external-link, .mt-internal-link, .mt-button) {
a[target="_blank"]:not(.mt-internal-link, .mt-button) {
display: inline-block;
position: relative;
color: $color-shopware-brand-500;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@
{{ description }}
</mt-text>

<mt-external-link v-if="linkHref && linkText" class="mt-empty-state__link" :href="linkHref">
<mt-link
v-if="linkHref && linkText"
:href="linkHref"
class="mt-empty-state__link"
type="external"
as="a"
>
{{ linkText }}
</mt-external-link>
</mt-link>

<mt-button
v-if="buttonText"
Expand All @@ -30,10 +36,10 @@
</template>

<script setup lang="ts">
import MtExternalLink from "@/components/form/mt-external-link/mt-external-link.vue";
import MtButton from "@/components/form/mt-button/mt-button.vue";
import MtIcon from "../../icons-media/mt-icon/mt-icon.vue";
import MtText from "@/components/content/mt-text/mt-text.vue";
import MtLink from "@/components/navigation/mt-link/mt-link.vue";
defineProps<{
headline: string;
Expand All @@ -48,24 +54,33 @@ defineEmits(["button-click"]);
</script>

<style scoped>
.mt-empty-state {
display: flex;
flex-direction: column;
align-items: flex-start;
}
.mt-empty-state__icon {
display: inline-block;
padding: 0.75rem;
border-radius: var(--border-radius-xs);
background-color: var(--color-interaction-secondary-dark);
margin-block-end: 1.5rem;
}
.mt-empty-state__headline {
margin-block-end: 0.5rem;
margin-top: 1.5rem;
margin-bottom: 0;
}
.mt-empty-state__description {
margin-top: 0.5rem;
}
.mt-empty-state__link {
margin-block-start: 0.5rem;
display: block;
margin-top: 0.5rem;
}
.mt-empty-state__button {
margin-block-start: 1.5rem;
margin-top: 1.5rem;
}
</style>
4 changes: 0 additions & 4 deletions packages/component-library/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import MtButton from "./components/form/mt-button/mt-button.vue";
import MtCheckbox from "./components/form/mt-checkbox/mt-checkbox.vue";
import MtColorpicker from "./components/form/mt-colorpicker/mt-colorpicker.vue";
import MtEmailField from "./components/form/mt-email-field/mt-email-field.vue";
import MtExternalLink from "./components/form/mt-external-link/mt-external-link.vue";
import MtLink from "./components/navigation/mt-link/mt-link.vue";
import MtNumberField from "./components/form/mt-number-field/mt-number-field.vue";
import MtPasswordField from "./components/form/mt-password-field/mt-password-field.vue";
Expand Down Expand Up @@ -55,7 +54,6 @@ export {
MtColorpicker,
MtDatepicker,
MtEmailField,
MtExternalLink,
MtLink,
MtNumberField,
MtPasswordField,
Expand Down Expand Up @@ -103,8 +101,6 @@ export {
// @deprecated
MtEmailField as SwEmailField,
// @deprecated
MtExternalLink as SwExternalLink,
// @deprecated
MtNumberField as SwNumberField,
// @deprecated
MtPasswordField as SwPasswordField,
Expand Down

0 comments on commit 46677ef

Please sign in to comment.