Icon

Used for rendering icons

import { Icon } from 'react-native-magnus'

<Icon name="like1" color="blue700" fontSize="title" />
<Icon
  name="star"
  color="yellow700"
  fontSize="6xl"
  fontFamily="FontAwesome"
/>
<Icon name="codesquare" color="red500" fontSize="6xl" />
<Icon name="android1" color="teal500" fontSize="6xl" />
<Icon name="heart" color="red500" fontSize="6xl" />
<Icon name="apple1" color="blue700" fontSize="6xl" />
<Icon name="appstore1" color="teal500" fontSize="6xl" />
<Icon name="slack" color="yellow700" fontSize="6xl" />

We are using react-native-vector-icons behinds the scene.

https://oblador.github.io/react-native-vector-icons/

Example #1

See it on Snack

<Icon
  bg="yellow400"
  p={20}
  rounded="circle"
  name="star"
  color="yellow700"
  fontSize="xl"
  fontFamily="FontAwesome"
/>

Props

PropertyDescriptionTypeDefault
mmargin`stringnumber`
mtmargin top`stringnumber`
mrmargin right`stringnumber`
mbmargin bottom`stringnumber`
mlmargin margin left`stringnumber`
mxmargin horizonal`stringnumber`
mymargin vertical`stringnumber`
ppadding`stringnumber`
ptpadding top`stringnumber`
prpadding right`stringnumber`
pbpadding bottom`stringnumber`
plpadding margin left`stringnumber`
pxpadding horizonal`stringnumber`
pypadding vertical`stringnumber`
hheightnumber-
wwidthnumber-
bgbackground colorstring-
minHmininmum heightnumber-
minWminimum widthstring-
roundedborder radius`stringnumber`
roundedTopborder radius top`stringnumber`
roundedBottomborder radius bottom`stringnumber`
roundedLeftborder radius left`stringnumber`
roundedRightborder radius right`stringnumber`
borderColorcolor for borderstring-
borderTopColorcolor for border topstring-
borderRightColorcolor for border rightstring-
borderLeftColorcolor for border leftstring-
borderBottomColorcolor for border bottomstring-
borderWidthwidth for bordernumber-
borderTopWidthwidth for border topnumber-
borderRightWidthwidth for border rightnumber-
borderLeftWidthwidth for border leftnumber-
borderBottomWidthwidth for border bottomnumber-
flexflex property for containernumber-
shadowdescribe the depth of shadow to be usednumber-
shadowColorcolor for shadowstring-
fontFamilyname of the font family for iconstringAntDesign
fontSizefontSize for iconstringmd
namename of iconstring-
coloricon colorstringgray500
positionused to position the childrens`absolute”“relative”`
topnumber of logical pixels to offset the top edge of this component.number-
rightnumber of logical pixels to offset the right edge of this component.number-
bottomnumber of logical pixels to offset the bottom edge of this component.number-
leftnumber of logical pixels to offset the left edge of this component.number-
opacityopacitynumber-