1.0.0 • Published 5 years ago

@raushanranjan/my-sample-package v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

If you're looking to build a website or a cross-platform mobile app – we will be happy to help you! Send a note to raushanranjan157@gmail.com and we will be in touch with you shortly.

Sample Package

📲See example app

My Sample Package Documentation

Import components

  1. yarn add my-sample-package OR
  2. npm i my-sample-package
  3. Use with ES6 syntax to import components
import {
  Message,
  Welcome,
} from 'my-sample-package'

Quick Example

<View>
  <Text>
    Welcome Screen
  </Text>
  <Welcome
    width={SCREEN_WIDTH}
    height={SCREEN_HEIGHT}
    fontSize={24}
    color={'#000'}
    fontWeight={'bold'}
    textAllign={'center'}
  />
</View>

Welcome Properties Detail

Define a welcome screen with following properties as such:

PropertyTypeDescription
widthNumberDefines the width of the view in which welcome screen text will be shown
heightNumberDefines the height of the view in which welcome screen text will be shown
fontSizeNumberDefines the fontSize of the text shown in welcome screen
colorstringDefines the color of the text shown in welcome screen
fontWeightstringDefines the fontWeight('bold','normal',etc.) of the text shown in welcome screen
textAllignstringDefines the alignment of the text shown in welcome screen

Responsive Welcome Screen

To render a responsive screen, use Dimensions react-native library to get the width of the screen of your device like such

import { Dimensions } from 'react-native'
const screenWidth = Dimensions.get('window').width

Message Screen

  <Welcome
    width={SCREEN_WIDTH}
    height={SCREEN_HEIGHT}
    message={'Welcome To My Sample Package'}
    fontSize={24}
    color={'#000'}
    fontWeight={'bold'}
    textAllign={'center'}
  />

Message Screen Properties Detail

Define a message screen with following properties as such:

PropertyTypeDescription
widthNumberDefines the width of the view in which welcome screen text will be shown
heightNumberDefines the height of the view in which welcome screen text will be shown
messagestringDefines the message which you want to show
fontSizeNumberDefines the fontSize of the text shown in welcome screen
colorstringDefines the color of the text shown in welcome screen
fontWeightstringDefines the fontWeight('bold','normal',etc.) of the text shown in welcome screen
textAllignstringDefines the alignment of the text shown in welcome screen

Welcome Screen

  <Welcome
    width={SCREEN_WIDTH}
    height={SCREEN_HEIGHT}
    fontSize={24}
    color={'#000'}
    fontWeight={'bold'}
    textAllign={'center'}
  />

Welcome Properties Detail

Define a welcome screen with following properties as such:

PropertyTypeDescription
widthNumberDefines the width of the view in which welcome screen text will be shown
heightNumberDefines the height of the view in which welcome screen text will be shown
fontSizeNumberDefines the fontSize of the text shown in welcome screen
colorstringDefines the color of the text shown in welcome screen
fontWeightstringDefines the fontWeight('bold','normal',etc.) of the text shown in welcome screen
textAllignstringDefines the alignment of the text shown in welcome screen