Skip to content

Commit c0b22ef

Browse files
committed
Remove group prop from print options
1 parent 7a551e6 commit c0b22ef

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ export interface _PrintConfig<T> {
7777
value: T
7878
prevValue?: T
7979
label: string
80-
group?: string
8180
type?: _PrintTypes
8281
styles?: Styles
8382
componentName: string

src/utils.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ export function print<T>({
6161
isGrouped: true,
6262
},
6363
type = _PrintTypes.Change,
64-
group = getGroupLabel(type, componentName),
6564
styles: { componentCSS, subValueCSS, changeCSS } = {},
6665
printer = {},
6766
logLevel = 'log',
@@ -73,7 +72,11 @@ export function print<T>({
7372
const groupMethod = flags.isCollapsed ? 'groupCollapsed' : 'group'
7473

7574
if (flags.isGrouped) {
76-
getCurrentPrinter(groupMethod)(group, componentCSS, subValueCSS)
75+
getCurrentPrinter(groupMethod)(
76+
getGroupLabel(type, componentName),
77+
componentCSS,
78+
subValueCSS,
79+
)
7780
}
7881

7982
if ('prevValue' in arguments[0]) {
@@ -86,7 +89,5 @@ export function print<T>({
8689
getCurrentPrinter(logLevel)(`${label.padStart(14, ' ')}: ${String(value)}`)
8790
}
8891

89-
if (flags.isGrouped) {
90-
getCurrentPrinter('groupEnd')()
91-
}
92+
if (flags.isGrouped) getCurrentPrinter('groupEnd')()
9293
}

0 commit comments

Comments
 (0)