README
@bothrs/react-native-layout
Utility components for handling interface layouts in React Native.
Installation
yarn add @bothrs/react-native-layout
Usage
import { Padding, Margin, Spacing, Line } from '@bothrs/react-native-layout'
// ...
API
Padding | Margin
A container component that applies the margin or padding around its children.
Props
amount
top?
: number | stringright?
: number | stringbottom?
: number | stringleft?
: number | stringhorizontal?
: number | stringvertical?
: number | string
backgroundColor?
: stringonLayout?
: (e: LayoutChangeEvent) => void
Spacing
A component that renders with the given width or height.
Props
width?
: number | stringheight?
: number | stringflex?
: boolean
Line
A component that renders a line with a given color and thickness.
Props
direction
: 'horizontal' | 'vertical'color
: stringthickness?
: number
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT