Skip to content

Commit e7deb6e

Browse files
committed
feat(CNavGroup): add compact variant
1 parent c512db1 commit e7deb6e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/components/nav/CNavGroup.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ import { defineComponent, h, onMounted, onUpdated, ref, RendererElement, Transit
33
const CNavGroup = defineComponent({
44
name: 'CNavGroup',
55
props: {
6+
/**
7+
* Make nav group more compact by cutting all `padding` in half.
8+
*/
9+
compact: Boolean,
610
/**
711
* Show nav group items.
812
*/
@@ -109,7 +113,12 @@ const CNavGroup = defineComponent({
109113
h(
110114
'ul',
111115
{
112-
class: 'nav-group-items',
116+
class: [
117+
'nav-group-items',
118+
{
119+
compact: props.compact,
120+
},
121+
],
113122
},
114123
slots.default &&
115124
slots.default().map((vnode, index) =>

0 commit comments

Comments
 (0)