From 380f175b9a320152ee7231a3bee7749ba769fd24 Mon Sep 17 00:00:00 2001 From: ilyabrower Date: Mon, 18 Nov 2024 14:20:07 +0100 Subject: [PATCH] [UIK-2326][website] removed renderFunction example in ddmenu (#1777) ## Motivation and Context ## How has this been tested? Manually ## Screenshots (if appropriate): ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue). - [ ] New feature (non-breaking change which adds functionality). - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected). - [X] Nice improve. ## Checklist: - [X] My code follows the code style of this project. - [X] I have updated the documentation accordingly or it's not required. - [X] Unit tests are not broken. - [X] I have added changelog note to corresponding `CHANGELOG.md` file with planned publish date. - [ ] I have added new unit tests on added of fixed functionality. --- .../__stories__/Dropdown-menu.stories.tsx | 5 -- .../docs-examples/render_function.tsx | 53 ------------------- .../dropdown-menu/dropdown-menu-code.md | 14 ----- 3 files changed, 72 deletions(-) delete mode 100644 stories/components/dropdown-menu/__stories__/docs-examples/render_function.tsx diff --git a/stories/components/dropdown-menu/__stories__/Dropdown-menu.stories.tsx b/stories/components/dropdown-menu/__stories__/Dropdown-menu.stories.tsx index 639c840fb9..579f3fbefa 100644 --- a/stories/components/dropdown-menu/__stories__/Dropdown-menu.stories.tsx +++ b/stories/components/dropdown-menu/__stories__/Dropdown-menu.stories.tsx @@ -8,7 +8,6 @@ import ItemActionsExample from './docs-examples/item_actions'; import ListItemTypesExample from './docs-examples/list_item_types'; import NestedExample from './docs-examples/nested'; import NestedWithFocusableExample from './docs-examples/nested_with_focusable'; -import RenderFunctionExample from './docs-examples/render_function'; import TheSecondMethodExample from './docs-examples/the_second_method'; const meta: Meta = { @@ -43,10 +42,6 @@ export const NestedWithFocusable: Story = { render: NestedWithFocusableExample, }; -export const RenderFunction: Story = { - render: RenderFunctionExample, -}; - export const TheSecondMethod: Story = { render: TheSecondMethodExample, }; diff --git a/stories/components/dropdown-menu/__stories__/docs-examples/render_function.tsx b/stories/components/dropdown-menu/__stories__/docs-examples/render_function.tsx deleted file mode 100644 index 6a160dda0e..0000000000 --- a/stories/components/dropdown-menu/__stories__/docs-examples/render_function.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import React from 'react'; -import DropdownMenu from 'intergalactic/dropdown-menu'; -import Button from 'intergalactic/button'; -import { Box } from '@semcore/flex-box'; - -const Demo = () => { - return ( - - {(props, handlers) => { - const { - getTriggerProps, // encapsulates Trigger logic - getPopperProps, // encapsulates Popper logic - getListProps, // encapsulates List logic - getItemProps, // // encapsulates Item logic - } = props; - - const popperProps = getPopperProps(); - - return ( - - - - - ); - }} - - ); -}; - -export default Demo; diff --git a/website/docs/components/dropdown-menu/dropdown-menu-code.md b/website/docs/components/dropdown-menu/dropdown-menu-code.md index 8022fc39fe..e30906f76e 100644 --- a/website/docs/components/dropdown-menu/dropdown-menu-code.md +++ b/website/docs/components/dropdown-menu/dropdown-menu-code.md @@ -88,20 +88,6 @@ The component offers several options for laying out list item types: ::: -## Render-function - -Like with lower-level components, you can access the component's logic by passing a render function into the body. - -You can find the list of available methods in the [Context section of the API](/components/dropdown-menu/dropdown-menu-api#context). - -::: sandbox - - - -::: - ## Nested menus ::: sandbox