Skip to content

A group of react native paper components used to show what licenses your expo app is using

License

Notifications You must be signed in to change notification settings

piotrpdev/expo-license-list

Repository files navigation

expo-license-list

A group of components used to display the licenses your expo app is using

Snack

Usage

Install using npm or yarn:

npm i expo-license-list
yarn add expo-license-list

Generate the license JSON data using the following script (you need npm-license-crawler):

npm-license-crawler -onlyDirectDependencies -json ./assets/licenses.json

Then use like this:

import * as React from 'react';

import {
  LicenseList,
  getLicensesFromJSON,
  LicenseListItem,
} from 'expo-license-list';

import { openBrowserAsync } from "expo-web-browser";

import licenses from './assets/licenses.json';

export default function App() {
  return (
    <LicenseList
      data={getLicensesFromJSON(licenses)}
      renderItem={({ item }) => (
        <LicenseListItem onPress={(url) => openBrowserAsync(url)} {...item} />
      )}
    />
  );
}

See the documentation for more technical info.

ToDo

  • Add tests.

About

A group of react native paper components used to show what licenses your expo app is using

Topics

Resources

License

Stars

Watchers

Forks