Skip to content

Commit 60ce34b

Browse files
MarcFabreleo91000
authored andcommitted
Update AI.md
1 parent a80c25b commit 60ce34b

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

AI.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,26 @@ Properties:
2626
- paginatorOffset: number - Starting index of current page. Default: 0
2727

2828
Children:
29-
- paginatorText: ww-text - Text component for page numbers
30-
- paginatorPrev: ww-icon - Previous navigation button. Default: {isWwObject:true,type:'ww-icon',content:{icon:'fas fa-angle-left'}}
31-
- paginatorNext: ww-icon - Next navigation button. Default: {isWwObject:true,type:'ww-icon',content:{icon:'fas fa-angle-right'}}
29+
- paginatorText: ww-text - Text component for page numbers.
30+
- paginatorPrev: ww-icon - Previous navigation button. Default: {type:'ww-icon',content:{icon:'fas fa-angle-left'}}.
31+
- paginatorNext: ww-icon - Next navigation button. Default: {type:'ww-icon',content:{icon:'fas fa-angle-right'}}
32+
33+
IMPORTANT: Use right margin and left margin for paginatorPrev and paginatorNext to prevent text being glued to the icon.
3234

3335
Features:
3436
- Supports custom pagination or collection-based pagination
3537
- Emits change event on page changes
3638
- Auto-generates navigation links with ellipsis
3739

3840
Example:
39-
{"tag":"ww-lang","name":"Language Selector","props":{"default":{"leftLayout":false,"backgroundColor":"#FFFFFF","hoverColor":"#F1F5F9"}},"styles":{"default":{"margin":"0 16px 0 0","borderRadius":"6px"}},"children":{"langLayout":[{"tag":"ww-flexbox","styles":{"default":{"display":"flex","padding":"8px 16px","backgroundColor":"#E20808","alignItems":"center","columnGap":"8px"}},"children":{"children":[{"tag":"ww-icon","props":{"default":{"icon":"fas fa-globe","color":"#64748B","fontSize":14}}},{"tag":"ww-text","props":{"default":{"tag":"p","text":{"en":""}}},"styles":{"default":{"fontSize":"14px","color":"#64748B"}}}]}}],"currentLangLayout":{"tag":"ww-flexbox","styles":{"default":{"display":"flex","padding":"8px 16px","backgroundColor":"#F31B1B","alignItems":"center","columnGap":"8px"}},"children":{"children":[{"tag":"ww-icon","props":{"default":{"icon":"fas fa-globe","color":"#64748B","fontSize":14}}},{"tag":"ww-text","props":{"default":{"tag":"p","text":{"en":""}}},"styles":{"default":{"fontSize":"14px","color":"#64748B"}}}]}},"langText":{"tag":"ww-text","props":{"default":{"tag":"p","text":"New text"}},"styles":{"default":{"padding":"8px 16px"}}},"currentLangText":{"tag":"ww-text","props":{"default":{"tag":"p","text":"New text"}},"styles":{"default":{"padding":"8px 16px","backgroundColor":"#FFFFFF","border":"1px solid #E2E8F0","borderRadius":"4px","color":"#64748B"}}}}}
41+
<elements>
42+
{"uid":"styled_paginator","tag":"ww-paginator","name":"Styled Paginator","props":{"default":{"useCustomPagination":true,"paginatorTotal":10,"paginatorLimit":2,"paginatorOffset":6}},"styles":{"default":{"marginTop":"24px","padding":"16px","backgroundColor":"#FFFFFF","borderRadius":"8px","boxShadow":"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)"}},"children":{"paginatorPrev":{"uid":"styled_prev_icon"},"paginatorNext":{"uid":"styled_next_icon"},"paginatorText":{"uid":"styled_page_text"}}}
43+
{"uid":"styled_prev_icon","tag":"ww-icon","name":"Styled Previous Icon","props":{"default":{"icon":"fas fa-arrow-left","color":"#3B82F6","fontSize":16}},"styles":{"default":{"cursor":"pointer","padding":"8px","marginRight":"6px","borderRadius":"6px","backgroundColor":"#EFF6FF","transition":"all 0.2s ease"},"_wwHover_default":{"backgroundColor":"#DBEAFE"}}}
44+
{"uid":"styled_next_icon","tag":"ww-icon","name":"Styled Next Icon","props":{"default":{"icon":"fas fa-arrow-right","color":"#3B82F6","fontSize":16}},"styles":{"default":{"cursor":"pointer","padding":"8px","marginLeft":"6px","borderRadius":"6px","backgroundColor":"#EFF6FF","transition":"all 0.2s ease"},"_wwHover_default":{"backgroundColor":"#DBEAFE"}}}
45+
{"uid":"styled_page_text","tag":"ww-text","name":"Styled Page Text","props":{"default":{"tag":"p"}},"styles":{"default":{"fontSize":"14px","fontWeight":"500","color":"#1E293B"}}}
46+
</elements>
4047

4148
Events:
4249
- change: Triggered when page changes
4350
Payload: {context: {page: number, offset: number, limit: number, total: number}}
4451
Description: Provides information about the new page state including page number, offset, items per page and total items
45-
46-
Variables: none

0 commit comments

Comments
 (0)