mCloud Design Mobile

mCloud Design Mobile

  • Docs
  • API
  • Help
  • Blog

›Component

Component

  • Button
  • SegmentedControl
  • SearchBar
  • Radio
  • Checkbox
  • Badge
  • Marquee
  • Switch
  • InputItem
  • NoticeBar
  • Textarea
  • List
  • Card
  • Picker
  • Label
  • EmptyView
  • Stepper
  • Tabs
  • DatePicker
  • Modal
  • Avatar
  • ActionSheet
  • ShareSheet

First Category

  • Button
  • Fifth Document

Avatar

Avatar

Basic Example:

import React from 'react'
import {
    View,
} from 'react-native'
import { Avatar } from 'mcloud-mobile'

export default class AvatarDemo extends React.Component {
    render() {
        return (
            <View
                style={{
                    flex:1,
                    flexDirection:'column',
                    marginTop:20,
                    marginLeft:20,
                }}
            >
                <Avatar
                    source={{ uri:'http://wx3.sinaimg.cn/orj360/006Ja9YYly1fy5iqie8muj30j60j6q3n.jpg' }}
                    type="white"
                />
                <Avatar
                    source={{ uri:'http://wx3.sinaimg.cn/orj360/006Ja9YYly1fy5iqie8muj30j60j6q3n.jpg' }}
                />
                <Avatar
                    type="white"
                />
            </View>
        )
    }
}

Props:

属性说明类型默认值
source头像资源链接object无
size头像尺寸number70
styles样式集合object无
type头像边框样式,可选值('normal', 'white')string'normal'
defaultAvatar默认头像objectrequire('./assets/default.png')
← ModalActionSheet →
  • Basic Example:
  • Props:
mCloud Design Mobile
Docs
Getting Started (or other categories)Guides (or other categories)API Reference (or other categories)
Community
User ShowcaseStack OverflowProject ChatTwitter
More
BlogGitHubStar
Facebook Open Source
Copyright © 2019 Your Name or Your Company Name