Skip to content

Commit

Permalink
fix(projects): fix build [unocss]: build failed to load icon "close"
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Mar 11, 2024
1 parent 9d11258 commit 6a5aaec
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
10 changes: 5 additions & 5 deletions packages/materials/src/libs/page-tab/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
background-color: var(--soy-primary-color-opacity2);
}

.button-tab .icon_close:hover {
.button-tab .svg-close:hover {
font-size: 12px;
color: #ffffff;
background-color: var(--soy-primary-color);
}

.button-tab_dark .icon_close:hover {
.button-tab_dark .svg-close:hover {
color: #000000;
}

Expand Down Expand Up @@ -70,17 +70,17 @@
color: var(--soy-primary-color2);
}

.chrome-tab .icon_close:hover {
.chrome-tab .svg-close:hover {
font-size: 12px;
color: #ffffff;
background-color: #9ca3af;
}

.chrome-tab_active .icon_close:hover {
.chrome-tab_active .svg-close:hover {
background-color: var(--soy-primary-color);
}

.chrome-tab_dark .icon_close:hover {
.chrome-tab_dark .svg-close:hover {
color: #000000;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/materials/src/libs/page-tab/index.module.css.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ declare const styles: {
readonly 'button-tab_dark': string;
readonly 'button-tab_active': string;
readonly 'button-tab_active_dark': string;
readonly icon_close: string;
readonly 'chrome-tab': string;
readonly 'chrome-tab_active': string;
readonly 'chrome-tab__bg': string;
readonly 'chrome-tab_active_dark': string;
readonly 'chrome-tab_dark': string;
readonly 'chrome-tab-divider': string;
readonly 'svg-close': string;
};
export default styles;
5 changes: 3 additions & 2 deletions packages/materials/src/libs/page-tab/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { PageTabMode, PageTabProps } from '../../types';
import { ACTIVE_COLOR, createTabCssVars } from './shared';
import ChromeTab from './chrome-tab.vue';
import ButtonTab from './button-tab.vue';
import SvgIconClose from './icon-close.vue';
import SvgClose from './svg-close.vue';
import style from './index.module.css';
defineOptions({
Expand Down Expand Up @@ -88,10 +88,11 @@ function handleClose() {
<slot></slot>
<template #suffix>
<slot name="suffix">
<SvgIconClose v-if="closable" :class="[style['icon_close']]" @click="handleClose" />
<SvgClose v-if="closable" :class="[style['svg-close']]" @click="handleClose" />
</slot>
</template>
</component>
</template>

<style scoped></style>
./svg-close.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
defineOptions({
name: 'IconClose'
name: 'SvgClose'
});
const emit = defineEmits<Emits>();
Expand Down

0 comments on commit 6a5aaec

Please sign in to comment.