Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
11 changes: 9 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,13 @@
import { computed, defineProps, useSlots } from 'vue';
import Icon from '../icon/Icon.vue';

/**
* Import red theme for destructive button style.
* This is marked as external in vite config, so consumers need to import
* '@codexteam/ui/styles/themes/red' in their app.
Comment thread
neSpecc marked this conversation as resolved.
Outdated
*/
import '@codexteam/ui/styles/themes/red';

const props = withDefaults(
defineProps<{
/**
Expand Down
5 changes: 5 additions & 0 deletions @codexteam/ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ export default defineConfig({
'@vueuse/shared',
'@editorjs/editorjs',
'@codexteam/icons',
/**
* Theme red is used by Button component for destructive style.
* Mark as external so it's not bundled into component but imported separately.
*/
'@codexteam/ui/styles/themes/red',
],
},
},
Expand Down
Loading