Skip to content

Commit

Permalink
feat(Page) rename isTertiaryNavGrouped
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik-Petrik committed Feb 20, 2024
1 parent 1832a08 commit 8a4243b
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
### page-rename-isTertiaryNavGrouped [(#9948)](https://github.com/patternfly/patternfly-react/pull/9948)

We've renamed the \`isTertiaryNavGrouped\` prop to \`isHorizontalSubnavGrouped\`.

#### Examples

In:

```jsx
%inputExample%
```

Out:

```jsx
%outputExample%
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const ruleTester = require('../../ruletester');
import * as rule from './page-rename-isTertiaryNavGrouped';

ruleTester.run("page-rename-isTertiaryNavGrouped", rule, {
valid: [
{
code: `<Page isTertiaryNavGrouped />`
},
{
code: `import { Page } from '@patternfly/react-core'; <Page someOtherProp />`
}
],
invalid: [
{
code: `import { Page } from '@patternfly/react-core'; <Page isTertiaryNavGrouped />`,
output: `import { Page } from '@patternfly/react-core'; <Page isHorizontalSubnavGrouped />`,
errors: [{
message: `We've renamed the \`isTertiaryNavGrouped\` prop to \`isHorizontalSubnavGrouped\`.`,
type: "JSXOpeningElement",
}]
},
]
});

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { renameProps } from '../../helpers';

// https://github.com/patternfly/patternfly-react/pull/9948
module.exports = {
meta: { fixable: 'code' },
create: renameProps({
Page:{
"isTertiaryNavGrouped":{
newName:"isHorizontalSubnavGrouped",
message:() =>
`We've renamed the \`isTertiaryNavGrouped\` prop to \`isHorizontalSubnavGrouped\`.`,
}
}
})
};

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { Page } from "@patternfly/react-core";

export const PageRenameIsTertiaryNavGroupedInput = () => <Page isTertiaryNavGrouped />
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { Page } from "@patternfly/react-core";

export const PageRenameIsTertiaryNavGroupedInput = () => <Page isHorizontalSubnavGrouped />

0 comments on commit 8a4243b

Please sign in to comment.