Skip to content

Commit aaacd30

Browse files
author
olaslo
committed
feat: updated docs
1 parent d4b0c80 commit aaacd30

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

src/components/AsideHeader/README-ru.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ export const Aside: FC = () => {
209209
| onItemClickCapture | Обратный вызов, срабатывающий при клике по элементу. | ` (event: React.SyntheticEvent) => void` | |
210210
| order | Определяет порядок отображения в элементе навигации. | `number` | |
211211
| pinned | Запрещает скрытие элемента меню в `AllPagesPanel`. | `boolean` | `false` |
212+
| preventUserRemoving | Запрещает пользователю скрывать/показывать элемент меню в режиме редактирования. | `boolean` | |
212213
| rightAdornment | Настраивает правую часть элемента меню. | `React.ReactNode` | |
213214
| title | Заголовок элемента меню. | `React.ReactNode` | |
214215
| tooltipText | Содержимое тултипа. | `React.ReactNode` | |
@@ -224,6 +225,22 @@ export const Aside: FC = () => {
224225
| ~~popupKeepMounted~~ | ⚠️ **Устарело**: Используйте `itemWrapper` для создания всплывающих окон. Всплывающее окно не будет удалено из DOM при скрытии. | `boolean` | `false` |
225226
| ~~renderPopupContent~~ | ⚠️ **Устарело**: Используйте `itemWrapper` для создания всплывающих окон. Функция отвечает за отрисовку контента во всплывающем окне. | `() => React.ReactNode` | |
226227
| ~~onOpenChangePopup~~ | ⚠️ **Устарело**: Используйте `itemWrapper` для создания всплывающих окон. Обратный вызов для изменения состояния popupVisible, например, при отклонении. | [`PopupProps['onOpenChange']`](https://github.com/gravity-ui/uikit/blob/7748aaeec8dc7414487f7c06c899f16b275b25ef/src/components/Popup/Popup.tsx#L61) | |
228+
| groupId | Идентификатор группы, к которой принадлежит элемент меню. Используется для группировки элементов меню | `string` | |
229+
230+
### `MenuGroup`
231+
232+
Позволяют организовать элементы меню в сворачиваемые группы. Каждая группа может иметь свою иконку, заголовок и состояние свернутости.
233+
234+
| Имя | Описание | Тип | Значение по умолчанию |
235+
| :----------------- | :------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------: | :-------------------: |
236+
| id | Идентификатор группы | `string` | |
237+
| title | Заголовок группы | `string` | |
238+
| icon | Иконка группы на основе компонента `Icon` из фреймворка UIKit | [`IconProps['data']`](https://github.com/gravity-ui/uikit/tree/main/src/components/Icon#properties) | |
239+
| order | Определяет порядок отображения группы | `number` | |
240+
| hidden | Скрывает группу из отображения | `boolean` | `false` |
241+
| collapsible | Разрешает сворачивание группы через интерфейс | `boolean` | |
242+
| collapsedByDefault | Начальное состояние свернутости, когда collapsible равно true | `boolean` | |
243+
| collapsed | Текущее состояние свернутости | `boolean` | |
227244

228245
### `TopAlert`
229246

src/components/AsideHeader/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ export const Aside: FC = () => {
210210
| onItemClickCapture | Callback will be called when clicking on the item | ` (event: React.SyntheticEvent) => void` | |
211211
| order | Determine the display order in the navigation | `number` | |
212212
| pinned | The parameter restricts hiding menu item in the `AllPagesPanel` | `boolean` | `false` |
213+
| preventUserRemoving | Prevents the user from hiding/showing the menu item in edit mode | `boolean` | |
213214
| rightAdornment | Customize right side of the menu item | `React.ReactNode` | |
214215
| title | The menu item title | `React.ReactNode` | |
215216
| tooltipText | Tooltip content | `React.ReactNode` | |
@@ -225,6 +226,22 @@ export const Aside: FC = () => {
225226
| ~~popupKeepMounted~~ | ⚠️ **Deprecated**: Use `itemWrapper` for popup functionality. The pop-up window will not be removed from the DOM when it is opened. | `boolean` | `false` |
226227
| ~~renderPopupContent~~ | ⚠️ **Deprecated**: Use `itemWrapper` for popup functionality. This function is responsible for rendering content in a pop-up window. | `() => React.ReactNode` | |
227228
| ~~onOpenChangePopup~~ | ⚠️ **Deprecated**: Use `itemWrapper` for popup functionality. A callback for changing the popupVisible state, such as when it is dismissed. | [`PopupProps['onOpenChange']`](https://github.com/gravity-ui/uikit/blob/7748aaeec8dc7414487f7c06c899f16b275b25ef/src/components/Popup/Popup.tsx#L61) | |
229+
| groupId | The group ID to which the menu item belongs. Used for grouping menu items | `string` | |
230+
231+
### `MenuGroup`
232+
233+
Menu groups allow you to organize menu items into collapsible groups. Each group can have its own icon, title, and collapsed state.
234+
235+
| Name | Description | Type | Default |
236+
| :----------------- | :----------------------------------------------- | :-------------------------------------------------------------------------------------------------: | :-----: |
237+
| id | The group identifier | `string` | |
238+
| title | The group title | `string` | |
239+
| icon | Group icon based on the uikit `Icon` component | [`IconProps['data']`](https://github.com/gravity-ui/uikit/tree/main/src/components/Icon#properties) | |
240+
| order | Determine the display order of the group | `number` | |
241+
| hidden | Hide the group from display | `boolean` | `false` |
242+
| collapsible | Allow collapsing the group via UI | `boolean` | |
243+
| collapsedByDefault | Initial collapsed state when collapsible is true | `boolean` | |
244+
| collapsed | Current collapsed state | `boolean` | |
228245

229246
### `TopAlert`
230247

0 commit comments

Comments
 (0)