0.0.29 • Published 3 years ago

@nadavshaham/brave-hackathon-assets-rn v0.0.29

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

How to use:

how to add Images:

in every component that can recive an image as a prop you have 2 options.

if you want to use regular images like .png just import the image and add it as a prop to the component in the source prop.

if you want to use svg you need to implement yourself an svg transformer and not just the source. 

For example:

    for regular images:

        import image from "./somepath/someimage.png"

        <SmallBlueButton source={image} />

    for svg:

    again, only if you knew how to create and use svg elements in react native.

        import SVG from "./somepath/somesvg.svg

        const svgElement = <SVG width="50" height="50">

        <SmallBlueButton svgSource={svgElement}  />

    if you pass the svg prop the component will just display what you passed him.

important note: in the situation where you pass a regular image to the source prop and you dont want to use the default style you can create by yourself an Image element and pass it to the svgSource.

 again, if svgSource exists the component just render what you passed so in theory you can pass him anything you want so:

let custom =  <View><TextInput /> </View>

<SmallBlueButton svgSource={custom}  />

how to add custom style to components:

if you look at the props the component can recive , props that has style in their name are custom style you can add to the component for example:

<GenericInput containerStyle={{backgroundColor:"red"}}  /> 

or <SmallBlueButton textStyle={{fontSize:20}} />
0.0.24

3 years ago

0.0.25

3 years ago

0.0.26

3 years ago

0.0.27

3 years ago

0.0.28

3 years ago

0.0.29

3 years ago

0.0.23

3 years ago

0.0.20

3 years ago

0.0.21

3 years ago

0.0.22

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.15

3 years ago

0.0.16

3 years ago

0.0.18

3 years ago

0.0.19

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago