Skip to content

Commit

Permalink
Fix 0.19 docs layout
Browse files Browse the repository at this point in the history
  • Loading branch information
iRoachie committed Apr 1, 2018
1 parent 493a02e commit 59ded7e
Show file tree
Hide file tree
Showing 19 changed files with 2,539 additions and 2,023 deletions.
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
package.json
*.md
316 changes: 178 additions & 138 deletions website/versioned_docs/version-0.19.0/avatar.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ original_id: avatar

<img src="/react-native-elements/img/avatar_all.png" width="500" >

#### Avatars

<img src="/react-native-elements/img/avatar_with_images.png" width="500" >

```js
Expand Down Expand Up @@ -111,139 +109,181 @@ original_id: avatar
/>
```

### Avatar Props

* [activeOpacity](#activeopacity)
* [avatarStyle](#avatarstyle)
* [component](#component)
* [containerStyle](#containerstyle)
* [height](#height)
* [icon](#icon)
* [iconStyle](#iconstyle)
* [imageProps](#imageprops)
* [onLongPress](#onlongpress)
* [onPress](#onpress)
* [overlayContainerStyle](#overlaycontainerstyle)
* [rounded](#rounded)
* [source](#source)
* [title](#title)
* [titleStyle](#titlestyle)
* [width](#width)


# Reference

### activeOpacity
style for avatar image

| Type | Default |
|:-------:|:-------:|
| string | 0.2 |

### avatarStyle
style for avatar image

| Type | Default |
|:-------:|:-------:|
| object (style) | none |


### component
component for enclosing element (eg: TouchableHighlight, View, etc)

| Type | Default |
|:-----:|:-------:|
| Function | TouchableHighlight|

### containerStyle
styling for outer container

| Type | Default |
|:-------:|:-------:|
| object (style) | none |

### height
height for the Avatar

| Type | Default |
|:-------:|:-------:|
| number | 34 |

### icon
height for the Avatar

| Type | Default |
|:-------:|:-------:|
| object {name: string, color: string, size: number, type: string (default is material-community, or choose one of simple-line-icon, zocial, font-awesome, octicon, ionicon, foundation, evilicon, or entypo), iconStyle: object(style)} | none |


### iconStyle
extra styling for icon component (optional)

| Type | Default |
|:-------:|:-------:|
| object (style) | none |

### imageProps
optional properties to pass to the avatar e.g "resizeMode"

| Type | Default |
|:-------:|:-------:|
| object (imageProperties) | none |

### onLongPress
callback function when long pressing component

| Type | Default |
|:-------:|:-------:|
| function | none |

### onPress
callback function when pressing component

| Type | Default |
|:-------:|:-------:|
| function | none |

### overlayContainerStyle
style for the view outside image or icon

| Type | Default |
|:-------:|:-------:|
| object (style) | none |

### rounded
determines the shape of avatar

| Type | Default |
|:-------:|:-------:|
| boolean | false |

### source
image source

| Type | Default |
|:-------:|:-------:|
| object (style) | none |

### title
renders title in the avatar

| Type | Default |
|:-------:|:-------:|
| string | none |


### titleStyle
style for the title

| Type | Default |
|:-------:|:-------:|
| object (style) | none |

### width
width for the avatar

| Type | Default |
|:-------:|:-------:|
| number | 34 |
### Props

* [`activeOpacity`](#activeopacity)
* [`avatarStyle`](#avatarstyle)
* [`component`](#component)
* [`containerStyle`](#containerstyle)
* [`height`](#height)
* [`icon`](#icon)
* [`iconStyle`](#iconstyle)
* [`imageProps`](#imageprops)
* [`onLongPress`](#onlongpress)
* [`onPress`](#onpress)
* [`overlayContainerStyle`](#overlaycontainerstyle)
* [`rounded`](#rounded)
* [`source`](#source)
* [`title`](#title)
* [`titleStyle`](#titlestyle)
* [`width`](#width)

---

# Reference

### `activeOpacity`

Opacity when pressed

| Type | Default |
| :----: | :-----: |
| number | 0.2 |

---

### `avatarStyle`

Style for avatar image

| Type | Default |
| :------------: | :-----: |
| object (style) | none |

---

### `component`

Component for enclosing element (eg: TouchableHighlight, View, etc)

| Type | Default |
| :------: | :----------------: |
| function | TouchableHighlight |

---

### `containerStyle`

Styling for outer container

| Type | Default |
| :------------: | :-----: |
| object (style) | none |

---

### `height`

Height of the Avatar

| Type | Default |
| :----: | :-----: |
| number | 34 |

---

### `icon`

| Type | Default |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----: |
| object {name: string, color: string, size: number, type: string (default is material-community, or choose one of simple-line-icon, zocial, font-awesome, octicon, ionicon, foundation, evilicon, or entypo), iconStyle: object(style)} | none |

---

### `iconStyle`

Extra styling for icon component (optional)

| Type | Default |
| :------------: | :-----: |
| object (style) | none |

---

### `imageProps`

Optional properties to pass to the avatar e.g "resizeMode"

| Type | Default |
| :----------------------: | :-----: |
| object (imageProperties) | none |

---

### `onLongPress`

Callback function when long pressing component

| Type | Default |
| :------: | :-----: |
| function | none |

---

### `onPress`

Callback function when pressing component

| Type | Default |
| :------: | :-----: |
| function | none |

---

### `overlayContainerStyle`

Style for the view outside image or icon

| Type | Default |
| :------------: | :-----: |
| object (style) | none |

---

### `rounded`

Makes the avatar circular

| Type | Default |
| :-----: | :-----: |
| boolean | false |

---

### `source`

Image source

| Type | Default |
| :------------: | :-----: |
| object (style) | none |

---

### `title`

Renders title in the avatar

| Type | Default |
| :----: | :-----: |
| string | none |

---

### `titleStyle`

Style for the title

| Type | Default |
| :------------: | :-----: |
| object (style) | none |

---

### `width`

Width of the avatar

| Type | Default |
| :----: | :-----: |
| number | 34 |
Loading

0 comments on commit 59ded7e

Please sign in to comment.