@gorhom/showcase-template
TypeScript icon, indicating that this package has built-in type declarations

3.0.2 • Public • Published

Showcase Template

npm npm npm runs with expo

A React Native template that helps developers to showcase their amazing libraries examples.


Installation

yarn add @gorhom/showcase-template
# or
npm install @gorhom/showcase-template

Usage

import React from 'react';
import { Alert } from 'react-native';
import Showcase from '@gorhom/showcase-template';

const DemoScreen = () => (
  <View>
    <ShowcaseLabel>Demo Screen</ShowcaseLabel>
  </View>
);

const data = [
  {
    title: 'Group 1',
    data: [
      {
        name: 'Default',
        slug: 'default',
        getScreen: () => DemoScreen,
      },
      {
        name: 'Example A',
        slug: 'example-a',
        getScreen: () => DemoScreen,
      },
      {
        name: 'Example B',
        slug: 'example-b',
        getScreen: () => DemoScreen,
      },
    ],
  },
  {
    title: 'Group 2',
    data: [
      {
        name: 'Example C',
        slug: 'example-c',
        getScreen: () => DemoScreen,
      },
      {
        name: 'Example D',
        slug: 'example-d',
        getScreen: () => DemoScreen,
      },
    ],
  },
];

export default function App() {
  return (
    <Showcase
      version="0.0.0"
      name="Awesome Library"
      description="It can do anything 🤯"
      author={{
        username: '@gorhom',
        url: 'https://twitter.com/gorhom',
      }}
      data={data}
    />
  );
}

Sponsor & Support

To keep this library maintained and up-to-date please consider sponsoring it on GitHub. Or if you are looking for a private support or help in customizing the experience, then reach out to me on Twitter @gorhom.

License

MIT


Mo Gorhom Mo Gorhom

Package Sidebar

Install

npm i @gorhom/showcase-template

Weekly Downloads

65

Version

3.0.2

License

MIT

Unpacked Size

181 kB

Total Files

273

Last publish

Collaborators

  • gorhom