Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions @codexteam/ui/src/vue/components/button/Button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<button
:class="[
$style.button,
`${$style.button}--${style}`,
iconType !== 'none' && `${$style.button}--icon-${iconType}`,
$style[`button--${style}`],
iconType !== 'none' && $style[`button--icon-${iconType}`],

'text-ui-base-medium',
]"
Expand All @@ -25,6 +25,11 @@
import { computed, defineProps, useSlots } from 'vue';
import Icon from '../icon/Icon.vue';

/**
* Red theme for destructive styles (auto-included, no manual import required by consumers).
*/
import '@codexteam/ui/styles/themes/red';

const props = withDefaults(
defineProps<{
/**
Expand Down
7 changes: 7 additions & 0 deletions @codexteam/ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ export default defineConfig({
'@vueuse/shared',
'@editorjs/editorjs',
'@codexteam/icons',
/**
* Mark the red theme as external because it's imported inside the UI library itself (used for destructive buttons)
* This prevents Rollup from trying to bundle/resolve @codexteam/ui/styles/themes/red as an internal module.
* It also avoids Rollup silencing the "failed to resolve import" error.
* The actual CSS file is still emitted separately via the styles/themes/red CSS entry in rollupOptions.input.
*/
'@codexteam/ui/styles/themes/red',
],
},
},
Expand Down
Loading