|
7 | 7 | import { multi } from '../actions/multi';
|
8 | 8 | import type { Actions } from '../actions/multi';
|
9 | 9 | import type { ThemeColors } from '$lib/types';
|
10 |
| - import { getComponentTheme } from './theme'; |
| 10 | + import { getComponentClasses } from './theme'; |
11 | 11 | import { getButtonGroup } from './ButtonGroup.svelte';
|
12 | 12 | import { asIconData, type IconInput } from '$lib/utils/icons';
|
13 | 13 |
|
|
40 | 40 | icon?: string;
|
41 | 41 | loading?: string;
|
42 | 42 | } = {};
|
43 |
| - const theme = getComponentTheme('Button'); |
| 43 | + const settingsClasses = getComponentClasses('Button'); |
44 | 44 |
|
45 | 45 | // Override default from `ButtonGroup` if set
|
46 | 46 | const groupContext = getButtonGroup();
|
|
443 | 443 | variant ?? 'none'
|
444 | 444 | ) && 'ring-[--ring-color]',
|
445 | 445 |
|
446 |
| - theme.root, |
| 446 | + settingsClasses.root, |
447 | 447 | classes?.root,
|
448 | 448 | $$props.class
|
449 | 449 | );
|
|
468 | 468 | >
|
469 | 469 | {#if loading}
|
470 | 470 | <span transition:slide={{ axis: 'x', duration: 200 }}>
|
471 |
| - <ProgressCircle size={16} width={2} class={cls(theme.loading, classes.loading)} /> |
| 471 | + <ProgressCircle size={16} width={2} class={cls(settingsClasses.loading, classes.loading)} /> |
472 | 472 | </span>
|
473 | 473 | {:else if icon}
|
474 | 474 | <span in:slide={{ axis: 'x', duration: 200 }}>
|
475 | 475 | {#if typeof icon === 'string' || 'icon' in icon}
|
476 | 476 | <!-- font path/url/etc or font-awesome IconDefinition -->
|
477 | 477 | <Icon
|
478 | 478 | data={asIconData(icon)}
|
479 |
| - class={cls('pointer-events-none', theme.icon, classes.icon)} |
| 479 | + class={cls('pointer-events-none', settingsClasses.icon, classes.icon)} |
480 | 480 | />
|
481 | 481 | {:else}
|
482 |
| - <Icon class={cls('pointer-events-none', theme.icon, classes.icon)} {...icon} /> |
| 482 | + <Icon class={cls('pointer-events-none', settingsClasses.icon, classes.icon)} {...icon} /> |
483 | 483 | {/if}
|
484 | 484 | </span>
|
485 | 485 | {/if}
|
|
0 commit comments