Skip to content

Commit

Permalink
BEM Refactor Kol-Accordion
Browse files Browse the repository at this point in the history
Refs: #7036
  • Loading branch information
AlexanderSchmidtCE committed Nov 13, 2024
1 parent 1bfa4bd commit 3dba735
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 89 deletions.
12 changes: 5 additions & 7 deletions packages/components/src/components/accordion/shadow.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// https://codepen.io/mbxtr/pen/OJPOYg?html-preprocessor=haml
import { Component, h, Host, Method, Prop, State, Watch } from '@stencil/core';
import { Component, h, Method, Prop, State, Watch } from '@stencil/core';
import type { JSX } from '@stencil/core';
import type {
AccordionAPI,
Expand Down Expand Up @@ -71,7 +71,7 @@ export class KolAccordion implements AccordionAPI, FocusableElement {

public render(): JSX.Element {
const { _open, _label, _disabled, _level } = this.state;
const rootClass = 'accordion';
const rootClass = 'kol-accordion';

const props: CollapsibleProps = {
id: this.nonce,
Expand All @@ -94,11 +94,9 @@ export class KolAccordion implements AccordionAPI, FocusableElement {
};

return (
<Host class="kol-accordion">
<KolCollapsibleFc {...props}>
<slot />
</KolCollapsibleFc>
</Host>
<KolCollapsibleFc {...props}>
<slot />
</KolCollapsibleFc>
);
}

Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/themes/bmf/src/components/accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
font-size: rem(16);
}

.accordion {
.kol-accordion {
width: 100%;
height: 100%;
display: grid;
Expand Down
2 changes: 1 addition & 1 deletion packages/themes/default/src/components/accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
font-family: var(--font-family);
}

.accordion {
.kol-accordion {
width: 100%;
height: 100%;
display: grid;
Expand Down
2 changes: 1 addition & 1 deletion packages/themes/ecl/src/ecl-ec/components/accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
font-size: rem(16);
}

.accordion {
.kol-accordion {
background-color: var(--color-grey-5);
border-color: var(--color-grey-25);
border-style: solid;
Expand Down
2 changes: 1 addition & 1 deletion packages/themes/ecl/src/ecl-eu/components/accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
font-size: rem(16);
}

.accordion {
.kol-accordion {
border-radius: rem(8);
box-shadow:
0 rem(2) rem(4) rgb(9 49 142 / 8%),
Expand Down
2 changes: 1 addition & 1 deletion packages/themes/itzbund/src/components/accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
font-size: rem(16);
}

.accordion {
.kol-accordion {
box-sizing: border-box;
width: 100%;
height: 100%;
Expand Down

0 comments on commit 3dba735

Please sign in to comment.