|
72 | 72 | {"name": "ribbonStyle", "type": "ViewStyle", "description": "Ribbon custom style"},
|
73 | 73 | {"name": "ribbonLabelStyle", "type": "TextStyle", "description": "Ribbon label custom style"},
|
74 | 74 | {"name": "customRibbon", "type": "JSX.Element", "description": "Custom ribbon"},
|
75 |
| - {"name": "isOnline", "type": "boolean", "description": "Determine if to show online badge"}, |
76 |
| - { |
77 |
| - "name": "status", |
78 |
| - "type": "StatusModes", |
79 |
| - "description": "AWAY, ONLINE, OFFLINE or NONE mode (if set to a value other then 'NONE' will override isOnline prop)" |
80 |
| - }, |
81 | 75 | {"name": "size", "type": " number", "description": "Custom size for the Avatar", "default": "50"},
|
82 | 76 | {"name": "onPress", "type": "(props: any) => void", "description": "Press handler"},
|
83 | 77 | {"name": "testID", "type": "string", "description": "Test identifier"}
|
84 | 78 | ],
|
85 | 79 | "snippet": [
|
86 |
| - "<Avatar source={{uri: 'https://lh3.googleusercontent.com/-cw77lUnOvmI/AAAAAAAAAAI/AAAAAAAAAAA/WMNck32dKbc/s181-c/104220521160525129167.jpg'$1}} label={IT$2}/>" |
87 |
| - ] |
| 80 | + "<View flex center row gap-s5>", |
| 81 | + "<Avatar", |
| 82 | + " size={60$2}", |
| 83 | + " source={{uri: 'https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/icons/icon%20examples%20for%20docs/avatar_1.jpg'}$3}", |
| 84 | + " badgeProps={{label: '2'}$4}", |
| 85 | + " badgePosition={'BOTTOM_RIGHT'}", |
| 86 | + " onPress={() => {}}", |
| 87 | + "/>", |
| 88 | + "<Avatar", |
| 89 | + " size={60}", |
| 90 | + " source={{uri: 'https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/icons/icon%20examples%20for%20docs/avatar_1.jpg'}}", |
| 91 | + " ribbonLabel='NEW'", |
| 92 | + "/>", |
| 93 | + "</View>" |
| 94 | + ], |
| 95 | + "docs": { |
| 96 | + "hero": { |
| 97 | + "title": "Avatar", |
| 98 | + "description": "An Avatar component is a visual representation of a user or entity, often displayed as a circular image, icon, or placeholder with initials. In mobile app design systems, it is used to personalize the interface by representing users in profiles, chats, notifications, or lists. Avatars help users quickly recognize people, accounts, or items, enhancing both engagement and navigational clarity.", |
| 99 | + "type": "hero", |
| 100 | + "layout": "horizontal", |
| 101 | + "content": [ |
| 102 | + { |
| 103 | + "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Avatar/avatar_hero.png" |
| 104 | + } |
| 105 | + ] |
| 106 | + }, |
| 107 | + "tabs": [ |
| 108 | + { |
| 109 | + "title": "Overview", |
| 110 | + "sections": [ |
| 111 | + { |
| 112 | + "type": "table", |
| 113 | + "columns": ["Property", "Component"], |
| 114 | + "items": [ |
| 115 | + { |
| 116 | + "title": "Image", |
| 117 | + "description": "", |
| 118 | + "content": [ |
| 119 | + { |
| 120 | + "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Avatar/avatar_table01.png" |
| 121 | + } |
| 122 | + ] |
| 123 | + }, |
| 124 | + { |
| 125 | + "title": "Initials", |
| 126 | + "description": "", |
| 127 | + "content": [ |
| 128 | + { |
| 129 | + "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Avatar/avatar_table04.png" |
| 130 | + } |
| 131 | + ] |
| 132 | + } |
| 133 | + ] |
| 134 | + }, |
| 135 | + { |
| 136 | + "type": "table", |
| 137 | + "columns": ["Property", "Component"], |
| 138 | + "items": [ |
| 139 | + { |
| 140 | + "title": "Badge (online indication)", |
| 141 | + "content": [ |
| 142 | + { |
| 143 | + "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Avatar/avatarPlaceholder_overview_table.png" |
| 144 | + } |
| 145 | + ] |
| 146 | + }, |
| 147 | + { |
| 148 | + "title": "Badge with icon", |
| 149 | + "description": "Not supported in XXSmall and 3Xsmall.", |
| 150 | + "content": [ |
| 151 | + { |
| 152 | + "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Avatar/avatarPlaceholder_overview_table02.png" |
| 153 | + } |
| 154 | + ] |
| 155 | + }, |
| 156 | + { |
| 157 | + "title": "Label", |
| 158 | + "description": "Supported only in XLarge, Large and Medium.", |
| 159 | + "content": [ |
| 160 | + { |
| 161 | + "value": "https://wixmp-1d257fba8470f1b562a0f5f2.wixmp.com/mads-docs-assets/assets/Components Docs/Avatar/avatarPlaceholder_overview_table03.png" |
| 162 | + } |
| 163 | + ] |
| 164 | + } |
| 165 | + ] |
| 166 | + } |
| 167 | + ] |
| 168 | + } |
| 169 | + ] |
| 170 | + } |
88 | 171 | }
|
0 commit comments