1.0.1 • Published 2 years ago

rn-tile v1.0.1

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

rn-tile

rn-tile is a React Native component for creating customizable tiles with leading, title, subtitle, description, and trailing elements.

Installation

npm install rn-tile

or

yarn add rn-tile

Usage

import React from 'react';
import { View, Text, Image } from 'react-native';
import Tile from 'rn-tile';

const YourComponent = () => {
  const handlePress = () => {
    // Handle tile press
  };

  return (
    <Tile
      leading={require('./path-to-your-leading-image')}
      title="Title"
      subTitle="Sub Title"
      description="Description"
      trailing={require('./path-to-your-trailing-image')}
      onPress={handlePress}
    />
  );
};

export default YourComponent;

Props

  • leadingStyle (optional): Custom style for the leading image.
  • leading (optional): Image source for the leading element.
  • titleStyle (optional): Custom style for the title text.
  • title: Title text for the tile.
  • subTitleStyle (optional): Custom style for the subtitle text.
  • subTitle (optional): Subtitle text for the tile.
  • descriptionStyle (optional): Custom style for the description text.
  • description (optional): Description text for the tile.
  • trailingStyle (optional): Custom style for the trailing image.
  • trailing (optional): Image source for the trailing element.
  • onPress (optional): Callback function for tile press.