Skip to content

Commit 0159fa1

Browse files
chore(readme): update README (#800)
1 parent 8805761 commit 0159fa1

File tree

1 file changed

+53
-1
lines changed

1 file changed

+53
-1
lines changed

packages/pf-codemods/README.md

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,9 @@ import { Chart } from "@patternfly/react-charts";
385385
Out:
386386

387387
```jsx
388-
import { Chart } from '@patternfly/react-charts/victory';
388+
import {
389+
Chart
390+
} from '@patternfly/react-charts/victory';
389391
```
390392

391393
### checkbox-radio-replace-isLabelBeforeButton [(#10016)](https://github.com/patternfly/patternfly-react/pull/10016)
@@ -1518,6 +1520,56 @@ export const MastheadStructureChangesInputPostNameChange = () => (
15181520

15191521
The markup for MenuItemAction has been updated. It now uses our Button component internally, has a wrapper around the action button, and no longer renders an icon wrapper inside the action button.
15201522

1523+
### menuToggle-remove-splitButtonOptions [(#11096)](https://github.com/patternfly/patternfly-react/pull/11096)
1524+
1525+
We have replaced `splitButtonOptions` prop on MenuToggle with `splitButtonItems`. SplitButtonOptions interface has been deleted, because its `variant` prop no longer supports the "action" option. The `items` prop of SplitButtonOptions will be passed directly to MenuToggle's new `splitButtonItems` prop.
1526+
1527+
#### Examples
1528+
1529+
In:
1530+
1531+
```jsx
1532+
import { MenuToggle, SplitButtonOptions } from "@patternfly/react-core";
1533+
1534+
const sbOptions: SplitButtonOptions = {
1535+
items: ["Item 1", "Item 2"],
1536+
variant: "action",
1537+
};
1538+
1539+
export const MenuToggleRemoveSplitButtonOptionsInput = () => (
1540+
<>
1541+
<MenuToggle
1542+
splitButtonOptions={{
1543+
items: ["Item 1", "Item 2"],
1544+
variant: "action",
1545+
}}
1546+
></MenuToggle>
1547+
<MenuToggle splitButtonOptions={sbOptions}></MenuToggle>
1548+
</>
1549+
);
1550+
```
1551+
1552+
Out:
1553+
1554+
```jsx
1555+
import { MenuToggle, } from "@patternfly/react-core";
1556+
1557+
const sbOptions = {
1558+
items: ["Item 1", "Item 2"],
1559+
variant: "action",
1560+
};
1561+
1562+
export const MenuToggleRemoveSplitButtonOptionsInput = () => (
1563+
<>
1564+
<MenuToggle
1565+
splitButtonItems={["Item 1", "Item 2"]}
1566+
></MenuToggle>
1567+
<MenuToggle splitButtonItems={sbOptions.items}></MenuToggle>
1568+
</>
1569+
);
1570+
```
1571+
1572+
15211573
### menuToggle-warn-iconOnly-toggle [(#10097)](https://github.com/patternfly/patternfly-react/pull/10097)
15221574

15231575
We now recommend passing any icon to the `icon` prop instead of passing it as children, such as for plain, icon only toggles. Passing an icon as children will result in incorrect styling.

0 commit comments

Comments
 (0)