From b4ae6ed1aa5e5e15b360bb71745b30768a63d2a0 Mon Sep 17 00:00:00 2001 From: Alessandro Date: Sun, 24 Jul 2022 15:12:57 +0000 Subject: [PATCH] chore: update docs --- docs/components/tree-item.md | 13 +++++++++++++ src/components/tree-item/tree-item.styles.ts | 5 +++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/components/tree-item.md b/docs/components/tree-item.md index 8dd3d6995..5a3cc753f 100644 --- a/docs/components/tree-item.md +++ b/docs/components/tree-item.md @@ -79,4 +79,17 @@ a `sl-lazy-load` event is emitted. Parent Node ``` +### Indentation size + +Use the `--indentation-size` custom property to set the tree item's indentation. + +```html preview + + Parent Node + Child 1 + Child 2 + Child 3 + +``` + [component-metadata:sl-tree-item] diff --git a/src/components/tree-item/tree-item.styles.ts b/src/components/tree-item/tree-item.styles.ts index 2609a0d1c..e4c0c750f 100644 --- a/src/components/tree-item/tree-item.styles.ts +++ b/src/components/tree-item/tree-item.styles.ts @@ -55,10 +55,11 @@ export default css` display: flex; align-items: center; justify-content: center; + box-sizing: content-box; color: var(--sl-color-neutral-400); padding: var(--sl-spacing-x-small); - width: 2rem; - height: 2rem; + width: 1rem; + height: 1rem; } .tree-item__item {