Skip to content

Commit

Permalink
making list-item scale internal, and updating all demos to set scale …
Browse files Browse the repository at this point in the history
…on the list parent and avoid mixing scales inside a single list
  • Loading branch information
eriklharper committed Nov 27, 2024
1 parent 6b3564f commit 135586f
Show file tree
Hide file tree
Showing 3 changed files with 1,630 additions and 518 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,11 @@ export class ListItem
/** When `true`, the item is open to show child components. */
@property({ reflect: true }) open = false;

/** Specifies the size of the component. */
/**
* Specifies the size of the component.
*
* @internal
* */
@property({ reflect: true }) scale: Scale = "m";

/** When `true` and the parent `calcite-list`'s `selectionMode` is `"single"`, `"single-persist"', or `"multiple"`, the component is selected. */
Expand Down
4 changes: 1 addition & 3 deletions packages/calcite-components/src/components/list/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ export class List
const items = Array.from(this.el.querySelectorAll(listItemSelector));

items.forEach((item) => {
if (item.scale === scale) {
item.scale = scale;
}
item.scale = scale;
item.selectionAppearance = selectionAppearance;
item.selectionMode = selectionMode;
item.interactionMode = interactionMode;
Expand Down
Loading

0 comments on commit 135586f

Please sign in to comment.