pebble-shared
TypeScript icon, indicating that this package has built-in type declarations

2.14.1 • Public • Published

pebble-shared

A set of utilities and icons shared between pebble-native and pebble-web.

Install

yarn add pebble-shared

Using icons in React Native

Add the following in your package.json;

"rnpm": {
    "assets": {
        "./node_modules/pebble-shared/native/icons"
    }
}

Then run react-native link. and then it can be used by importing the Icon component.

import { Icon } from "@anarock/pebble/native";

// Usage
<Icon name="iconName" size={20} color="#000000" />;

Using in Expo

In your entry file App.js

export default class App extends Component {
  state = {
    fontsLoaded: false
  };

  async componentDidMount() {
    await Font.loadAsync({
      pebble: require("./node_modules/pebble-shared/native/icons/pebble.ttf")
    });

    this.setState({
      fontsLoaded: true
    });
  }

  render() {
    return this.state.fontsLoaded && <Main />;
  }
}

Acknowledgements

We use Chromaticqa for visual regression testing and it is awesome.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i pebble-shared

Weekly Downloads

258

Version

2.14.1

License

MIT

Unpacked Size

765 kB

Total Files

32

Last publish

Collaborators

  • ritz078
  • zhirzh
  • pranjal-jain