Skip to content

Commit

Permalink
Merge branch 'main' into didchange-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jeripeierSBB committed Nov 27, 2024
2 parents dc894e3 + ce8c318 commit ca651fd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 21 deletions.
1 change: 0 additions & 1 deletion src/elements/button/mini-button.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from './mini-button/mini-button-base-element.js';
export * from './mini-button/mini-button.js';
16 changes: 0 additions & 16 deletions src/elements/button/mini-button/mini-button-base-element.ts

This file was deleted.

17 changes: 13 additions & 4 deletions src/elements/button/mini-button/mini-button.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import type { CSSResultGroup } from 'lit';
import type { CSSResultGroup, TemplateResult } from 'lit';
import { customElement } from 'lit/decorators.js';

import { SbbDisabledTabIndexActionMixin } from '../../core/mixins.js';
import { SbbButtonBaseElement } from '../../core/base-elements.js';
import { slotState } from '../../core/decorators.js';
import { SbbDisabledTabIndexActionMixin, SbbNegativeMixin } from '../../core/mixins.js';
import { SbbIconNameMixin } from '../../icon.js';

import { SbbMiniButtonBaseElement } from './mini-button-base-element.js';
import style from './mini-button.scss?lit&inline';

/**
Expand All @@ -14,8 +16,15 @@ import style from './mini-button.scss?lit&inline';
*/
export
@customElement('sbb-mini-button')
class SbbMiniButtonElement extends SbbDisabledTabIndexActionMixin(SbbMiniButtonBaseElement) {
@slotState()
class SbbMiniButtonElement extends SbbDisabledTabIndexActionMixin(
SbbNegativeMixin(SbbIconNameMixin(SbbButtonBaseElement)),
) {
public static override styles: CSSResultGroup = style;

protected override renderTemplate(): TemplateResult {
return super.renderIconSlot();
}
}

declare global {
Expand Down
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default defineConfig({
scss: {
// https://vitejs.dev/config/shared-options#css-preprocessoroptions
// TODO: api: 'modern',
api: 'legacy',
silenceDeprecations: ['legacy-js-api'],
},
},
Expand Down

0 comments on commit ca651fd

Please sign in to comment.