Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edu 10618 feedback 3249 improvement #135

Merged
merged 5 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Added
- Added an image of how the category menu layout looks.
- Applied Localization review.

## [2.18.0] - 2022-12-23

### Fixed
Expand Down
28 changes: 16 additions & 12 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@
[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

Category Menu app is a store component that shows a department list of the store on an customizable menu, and this app is used by store theme.
The Category Menu app is a store component that shows the store’s department list on a custom menu.
barbara-celi marked this conversation as resolved.
Show resolved Hide resolved

![category-menu](https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/docs/vtex-menu-0.png)

## Configuration

1. Add the app to your theme's dependencies on the `manifest.json`, for example:
1. Add the app to your store theme's dependencies in the `manifest.json`.

```json
dependencies: {
"vtex.category-menu": "2.x"
}
```

2. Add the `category-menu` block into your theme.
2. Add the `category-menu` block to your store theme.

```json
{
Expand All @@ -34,24 +36,26 @@ Category Menu app is a store component that shows a department list of the store
}
```

### `category-menu` props

| Prop name | Type | Description | Default Value |
| -------------------- | -------------- | ----------------------------------------------------------------------------------------------- | ------------- |
| `showAllDepartments` | `Boolean` | Shows all departments category in menu | `true` |
| `menuDisposition` | `Enum` | Indicates the disposition of the menu on the screen. Possible values: `left`, `center`, `right` | `center` |
| `showSubcategories` | `Boolean` | Decides if the subcategories will be displayed | `true` |
| `departments` | `Array(items)` | List of departments `items` to be displayed on the menu | `[]` |
| `mobileMode` | `Boolean` | Use this as `true` to render the category menu in a sidebar | `false` |
| `sortSubcategories` | `Enum` | Determine how subcategories are sorted. Possible values `name` | |
| `showAllDepartments` | `Boolean` | Shows all department categories in the menu | `true` |
| `menuDisposition` | `Enum` | Indicates the menu's position on the screen. Possible values: `left`, `center`, `right` | `center` |
| `showSubcategories` | `Boolean` | Defines if the subcategories will be displayed | `true` |
| `departments` | `Array(items)` | List of department `items` to be displayed on the menu | `[]` |
| `mobileMode` | `Boolean` | Renders the category menu in a sidebar if set to `true` | `false` |
| `sortSubcategories` | `Enum` | Determines how subcategories are sorted. Possible value: `name` | |

Items:
### `category-menu` items

| Prop name | Type | Description |
| --------- | -------- | --------------------------------------------- |
| `id` | `Number` | The department Id to be displayed on the menu |
| `id` | `Number` | The department ID to be displayed on the menu |

## Customization

In order to apply CSS customizations in this and other blocks, follow the instructions given in the recipe on [Using CSS Handles for store customization](https://vtex.io/docs/recipes/style/using-css-handles-for-store-customization).
In order to apply CSS customizations in this and other blocks, follow the instructions on [Using CSS Handles for store customization](https://vtex.io/docs/recipes/style/using-css-handles-for-store-customization).

| CSS Handles |
| --------------------------- |
Expand Down
Binary file added docs/vtex-menu-0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading