From c0c8f798d9f6e0d1c4d938511800b5e2e2869b25 Mon Sep 17 00:00:00 2001 From: Austin Sullivan Date: Tue, 5 Nov 2024 13:05:47 -0500 Subject: [PATCH] chore(readme): update README --- packages/pf-codemods/README.md | 54 +++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/packages/pf-codemods/README.md b/packages/pf-codemods/README.md index 777d0403..ea5eb9dc 100644 --- a/packages/pf-codemods/README.md +++ b/packages/pf-codemods/README.md @@ -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) @@ -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 = () => ( + <> + + + +); +``` + +Out: + +```jsx +import { MenuToggle, } from "@patternfly/react-core"; + +const sbOptions = { + items: ["Item 1", "Item 2"], + variant: "action", +}; + +export const MenuToggleRemoveSplitButtonOptionsInput = () => ( + <> + + + +); +``` + + ### 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.