Skip to content

Commit

Permalink
chore(readme): update README (#800)
Browse files Browse the repository at this point in the history
  • Loading branch information
wise-king-sullyman authored Nov 5, 2024
1 parent 8805761 commit 0159fa1
Showing 1 changed file with 53 additions and 1 deletion.
54 changes: 53 additions & 1 deletion packages/pf-codemods/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,9 @@ import { Chart } from "@patternfly/react-charts";
Out:

```jsx
import { Chart } from '@patternfly/react-charts/victory';
import {
Chart
} from '@patternfly/react-charts/victory';
```

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

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.

### menuToggle-remove-splitButtonOptions [(#11096)](https://github.com/patternfly/patternfly-react/pull/11096)

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.

#### Examples

In:

```jsx
import { MenuToggle, SplitButtonOptions } from "@patternfly/react-core";

const sbOptions: SplitButtonOptions = {
items: ["Item 1", "Item 2"],
variant: "action",
};

export const MenuToggleRemoveSplitButtonOptionsInput = () => (
<>
<MenuToggle
splitButtonOptions={{
items: ["Item 1", "Item 2"],
variant: "action",
}}
></MenuToggle>
<MenuToggle splitButtonOptions={sbOptions}></MenuToggle>
</>
);
```

Out:

```jsx
import { MenuToggle, } from "@patternfly/react-core";

const sbOptions = {
items: ["Item 1", "Item 2"],
variant: "action",
};

export const MenuToggleRemoveSplitButtonOptionsInput = () => (
<>
<MenuToggle
splitButtonItems={["Item 1", "Item 2"]}
></MenuToggle>
<MenuToggle splitButtonItems={sbOptions.items}></MenuToggle>
</>
);
```


### menuToggle-warn-iconOnly-toggle [(#10097)](https://github.com/patternfly/patternfly-react/pull/10097)

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.
Expand Down

0 comments on commit 0159fa1

Please sign in to comment.