-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(DataListAction): Remove isPlainButtonAction prop (#775)
* feat(DataListAction): Remove isPlainButtonAction prop * fixes from core review comments * remove .history and add it to gitignore
- Loading branch information
Showing
6 changed files
with
71 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,7 @@ lerna-output.txt | |
.idea | ||
test/packages/* | ||
.DS_Store | ||
dist | ||
dist | ||
|
||
# IDE - VSCode | ||
.history |
17 changes: 17 additions & 0 deletions
17
...RemoveIsPlainButtonActionProp/dataListAction-remove-isPlainButtonAction-prop.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
### dataListAction-remove-isPlainButtonAction-prop [(#10939)](https://github.com/patternfly/patternfly-react/pull/10939) | ||
|
||
The `isPlainButtonAction` prop has been removed from DataListAction as a wrapper is no longer needed. | ||
|
||
#### Examples | ||
|
||
In: | ||
|
||
```jsx | ||
%inputExample% | ||
``` | ||
|
||
Out: | ||
|
||
```jsx | ||
%outputExample% | ||
``` |
25 changes: 25 additions & 0 deletions
25
...ctionRemoveIsPlainButtonActionProp/dataListAction-remove-isPlainButtonAction-prop.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const ruleTester = require("../../ruletester"); | ||
import * as rule from "./dataListAction-remove-isPlainButtonAction-prop"; | ||
|
||
ruleTester.run("dataListAction-remove-isPlainButtonAction-prop", rule, { | ||
valid: [ | ||
{ | ||
code: `<DataListAction isPlainButtonAction />`, | ||
}, | ||
{ | ||
code: `import { DataListAction } from '@patternfly/react-core'; <DataListAction someOtherProp />`, | ||
}, | ||
], | ||
invalid: [ | ||
{ | ||
code: `import { DataListAction } from '@patternfly/react-core'; <DataListAction isPlainButtonAction />`, | ||
output: `import { DataListAction } from '@patternfly/react-core'; <DataListAction />`, | ||
errors: [ | ||
{ | ||
message: `The \`isPlainButtonAction\` prop has been removed from DataListAction as a wrapper is no longer needed.`, | ||
type: "JSXOpeningElement", | ||
}, | ||
], | ||
}, | ||
], | ||
}); |
15 changes: 15 additions & 0 deletions
15
...ListActionRemoveIsPlainButtonActionProp/dataListAction-remove-isPlainButtonAction-prop.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { renameProps } from "../../helpers"; | ||
|
||
// https://github.com/patternfly/patternfly-react/pull/10939 | ||
module.exports = { | ||
meta: { fixable: "code" }, | ||
create: renameProps({ | ||
DataListAction: { | ||
isPlainButtonAction: { | ||
newName: "", | ||
message: | ||
"The `isPlainButtonAction` prop has been removed from DataListAction as a wrapper is no longer needed.", | ||
}, | ||
}, | ||
}), | ||
}; |
5 changes: 5 additions & 0 deletions
5
...tActionRemoveIsPlainButtonActionProp/dataListActionRemoveIsPlainButtonActionPropInput.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { DataListAction } from "@patternfly/react-core"; | ||
|
||
export const DataListActionRemoveIsPlainButtonActionPropInput = () => ( | ||
<DataListAction isPlainButtonAction/> | ||
); |
5 changes: 5 additions & 0 deletions
5
...ActionRemoveIsPlainButtonActionProp/dataListActionRemoveIsPlainButtonActionPropOutput.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { DataListAction } from "@patternfly/react-core"; | ||
|
||
export const DataListActionRemoveIsPlainButtonActionPropInput = () => ( | ||
<DataListAction /> | ||
); |