@@ -64,32 +64,27 @@ ruleTester.run('no-deprecated-props', rule, {
6464 ] ,
6565 invalid : [
6666 {
67- code : `
68- import {ActionList} from '@primer/react';
69- <ActionList>
70- <ActionList.Group title="Group heading 1">
71- <ActionList.Item>Item</ActionList.Item>
72- </ActionList.Group>
73- <ActionList.Group title="Group heading 2">
74- <ActionList.Item>Item 2</ActionList.Item>
75- </ActionList.Group>
76- </ActionList>` ,
77- output : `
78- import {ActionList} from '@primer/react';
79- <ActionList>
80- <ActionList.Group>
81- <ActionList.GroupHeading>Group heading 1</ActionList.GroupHeading>
82- <ActionList.Item>Item</ActionList.Item>
83- </ActionList.Group>
84- <ActionList.Group>
85- <ActionList.GroupHeading>Group heading 2</ActionList.GroupHeading>
86- <ActionList.Item>Item 2</ActionList.Item>
87- </ActionList.Group>
88- </ActionList>` ,
67+ code : `<ActionList.Group title="Group heading 1"></ActionList.Group>` ,
68+ output : `<ActionList.Group><ActionList.GroupHeading>Group heading 1</ActionList.GroupHeading></ActionList.Group>` ,
8969 errors : [
9070 {
9171 messageId : 'titlePropDeprecated' ,
9272 } ,
73+ ] ,
74+ } ,
75+ {
76+ code : `<ActionList.Group title="Group heading 1" sx={{padding: 2}}></ActionList.Group>` ,
77+ output : `<ActionList.Group sx={{padding: 2}}><ActionList.GroupHeading>Group heading 1</ActionList.GroupHeading></ActionList.Group>` ,
78+ errors : [
79+ {
80+ messageId : 'titlePropDeprecated' ,
81+ } ,
82+ ] ,
83+ } ,
84+ {
85+ code : `<ActionList.Group variant="filled" title="Group heading 1"></ActionList.Group>` ,
86+ output : `<ActionList.Group variant="filled"><ActionList.GroupHeading>Group heading 1</ActionList.GroupHeading></ActionList.Group>` ,
87+ errors : [
9388 {
9489 messageId : 'titlePropDeprecated' ,
9590 } ,
0 commit comments