Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
ogonkov committed Nov 1, 2023
1 parent 84f24a8 commit de98c44
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/Menu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ The `Icon` property is used to display an icon for a menu item:
<ExampleBlock
code={`
<Menu>
<Menu.Item icon={<Icon size={16} data={GearIcon} />}>Item with icon</Menu.Item>
<Menu.Item iconStart={<Icon size={16} data={GearIcon} />}>Item with icon</Menu.Item>
<Menu.Item>Item without icon</Menu.Item>
</Menu>
`}
>
<UIKit.Menu>
<UIKit.Menu.Item icon={
<UIKit.Menu.Item iconStart={
<UIKit.Icon data={() => (
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" class="yc-icon" fill="currentColor" stroke="none" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M7.199 2H8.8a.2.2 0 0 1 .2.2c0 1.808 1.958 2.939 3.524 2.034a.199.199 0 0 1 .271.073l.802 1.388a.199.199 0 0 1-.073.272c-1.566.904-1.566 3.164 0 4.069a.199.199 0 0 1 .073.271l-.802 1.388a.199.199 0 0 1-.271.073C10.958 10.863 9 11.993 9 13.8a.2.2 0 0 1-.199.2H7.2a.199.199 0 0 1-.2-.2c0-1.808-1.958-2.938-3.524-2.034a.199.199 0 0 1-.272-.073l-.8-1.388a.199.199 0 0 1 .072-.271c1.566-.905 1.566-3.165 0-4.07a.199.199 0 0 1-.073-.271l.801-1.388a.199.199 0 0 1 .272-.073C5.042 5.138 7 4.007 7 2.2c0-.11.089-.199.199-.199ZM5.5 2.2c0-.94.76-1.7 1.699-1.7H8.8c.94 0 1.7.76 1.7 1.7a.85.85 0 0 0 1.274.735 1.699 1.699 0 0 1 2.32.622l.802 1.388c.469.813.19 1.851-.622 2.32a.85.85 0 0 0 0 1.472 1.7 1.7 0 0 1 .622 2.32l-.802 1.388a1.699 1.699 0 0 1-2.32.622.85.85 0 0 0-1.274.735c0 .939-.76 1.7-1.699 1.7H7.2a1.7 1.7 0 0 1-1.699-1.7.85.85 0 0 0-1.274-.735 1.698 1.698 0 0 1-2.32-.622l-.802-1.388a1.699 1.699 0 0 1 .622-2.32.85.85 0 0 0 0-1.471 1.699 1.699 0 0 1-.622-2.321l.801-1.388a1.699 1.699 0 0 1 2.32-.622A.85.85 0 0 0 5.5 2.2Zm4 5.8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" clip-rule="evenodd"></path></svg></svg>
)} size={16} />
Expand All @@ -161,7 +161,7 @@ LANDING_BLOCK-->

```tsx
<Menu>
<Menu.Item icon={<Icon size={16} data={GearIcon} />}>Item with icon</Menu.Item>
<Menu.Item iconStart={<Icon size={16} data={GearIcon} />}>Item with icon</Menu.Item>
<Menu.Item>Item without icon</Menu.Item>
</Menu>
```
Expand Down Expand Up @@ -240,6 +240,8 @@ LANDING_BLOCK-->

| Name | Description | Type | Default |
| :--------- | :----------------------------------------- | :-----------------------: | :--------: |
| iconStart | Menu icon before item text | `ReactNode` | |
| iconEnd | Menu icon after item text | `ReactNode` | |
| selected | Menu item selected flag | `boolean` | `false` |
| disabled | Menu item disabled flag | `boolean` | `false` |
| active | Menu item active flag | `boolean` | `false` |
Expand Down

0 comments on commit de98c44

Please sign in to comment.