0.9.0 • Published 2 years ago

@breeffy/icons v0.9.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

@breeffy/icons

Component to show FontAwesome icons.

Features

Peer Dependencies

"peerDependencies": {
  "react": "*",
  "react-native": "*",
  "react-native-svg": "*"
}

See this section about peer dependencies and how to get correct versions.

Installation

# Install react-native-svg peer dependency
$ yarn add react-native-svg
# Install @breeffy/icons package
$ yarn add @breeffy/icons
# Install FontAwesome icon packs
$ yarn add @fortawesome/free-solid-svg-icons

Configuration

Add required icons or styles into library

import { library } from '@fortawesome/fontawesome-svg-core';
import { fas } from '@fortawesome/free-solid-svg-icons';

library.add(fas);

Usage

import { Icon } from '@breeffy/icons';
import type { IconProps } from '@breeffy/icons';

export const Icon = () => {
  return <Icon icon={['far', 'address-book']} />;
};

See storybook for use case examples. Also see react-native-fontawesome documentation, most of it is still valid.