From bc1645c3faf178982e68ec2c4f8a739182f6c974 Mon Sep 17 00:00:00 2001 From: Jonas Rittershofer Date: Mon, 18 Jul 2022 22:40:39 +0200 Subject: [PATCH 1/2] Allow oneLine ListItem Signed-off-by: Jonas Rittershofer --- src/components/ListItem/ListItem.vue | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/components/ListItem/ListItem.vue b/src/components/ListItem/ListItem.vue index b6a4e46d3a..975f7f7706 100644 --- a/src/components/ListItem/ListItem.vue +++ b/src/components/ListItem/ListItem.vue @@ -145,7 +145,8 @@
-
+
Date: Mon, 18 Jul 2022 23:08:56 +0200 Subject: [PATCH 2/2] Introduce compact mode Signed-off-by: Jonas Rittershofer --- src/components/ListItem/ListItem.vue | 81 +++++++++++++++++++++++++++- 1 file changed, 79 insertions(+), 2 deletions(-) diff --git a/src/components/ListItem/ListItem.vue b/src/components/ListItem/ListItem.vue index 975f7f7706..04da527e36 100644 --- a/src/components/ListItem/ListItem.vue +++ b/src/components/ListItem/ListItem.vue @@ -20,7 +20,7 @@ --> -# Usage +### Default Usage ```
+``` + +### ListItem compact mode +``` +
    + + + + + + + + + + + + + + + + +
```
@@ -139,7 +198,8 @@ @click="onClick" @keydown.esc="hideActions"> -
+
@@ -275,6 +335,14 @@ export default { default: false, }, + /** + * Show the ListItem in compact design + */ + compact: { + type: Boolean, + default: false, + }, + /** * Toggle the active state of the component */ @@ -506,6 +574,15 @@ export default { display: flex; align-items: center; height: 48px; + + &--compact { + height: 36px; + + .line-one, .line-two { + margin-top: -4px; + margin-bottom: -4px; + } + } } &-content {