0.2.0 • Published 2 years ago

react-native-zigzag-view v0.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

react-native-zigzag-view

ZigzagView for using for tickets, and receipts

Installation

yarn add react-native-zigzag-view

This package depends on react-native-svg, make sure to install it

Usage

import React from "react"
import { Text, View } from "react-native"
import ZigzagView from "react-native-zigzag-view"

const Receipt = () => {
  return <ZigzagView
    backgroundColor="#CCC"
    surfaceColor="#FFF"
  >
    {Content of receipt}
  </ZigzagView>
}

Properties

Inherits View props

NameTypeDescriptionDefaultRequired
surfaceColorstringbackground color of content container's view, and zigzag jagsNo
backgroundColorstringbackground color of wrapper viewNo
topbooleanif true, then show zigzag border toptrueNo
bottombooleanif true, then show zigzag border bottomtrueNo
zigzagPropsZigzagLinesPropsproperties of both zigzag linesNo
styleViewStylestyle of wrapper viewNo
contentContainerStyleViewStylestyle of content container's viewNo

Notes

  • backgroundColor property has precedence over corresponding attribute of style property
  • surfaceColor property has precedence over backgroundColor attribute of contentContainerStyle property
  • zigzagProps does not accept backgroundColor, color, width, and position attributes