Add New Item
The add-new-item
block displays a button to direct the list owner to the search page for adding new items to their list.
Configuration
- Import the
vtex.list
app to your theme's peer dependencies in themanifest.json
file as in the following example:
_10 "peerDependencies": {_10 "vtex.list": "3.x"_10 }
- Add the
add-new-item
block to other theme block, such as theresponsive-layout.desktop
. For example:
_10 "responsive-layout.desktop": {_10 "children": [_10+ "add-new-item",_10 ]_10 }
Props
Prop Name | Type | Description | Default value |
---|---|---|---|
linkIcon | string | Icon for the button | https://vtex.vtexassets.com/assets/vtex/assets-builder/vtex.list-theme/0.11.0/ico_plus_blue___c42684ec58c4f1545ce21a4e355211c8.svg |
linkRedirection | string | Path where the user will be redirected on click.(department / category / collection) | - |
nameButton | string | Text at the button | Add items |
textAlignment | string | Text alignment on the button (LEFT / CENTER / RIGHT) | CENTER |
textPosition | string | Text position on the button (LEFT / CENTER / RIGHT) | CENTER |
classes | string | Add new classes | - |