@kiwicom/universal-components
Component Library for React Native, Expo and React applications
Last updated 2 years ago by robincsl_kiwi .
MIT · Original npm · Tarball · package.json
$ cnpm install @kiwicom/universal-components 
SYNC missed versions from official npm registry.

Universal Components

Component library compatible with Expo/React Native projects as well as React applications.

Relies on react-native-web to port components, written with a React Native first approach, to the web.

???? Storybook | ???? Documentation

Usage

yarn install @kiwicom/universal-components
# Only for React Native
react-native link @kiwicom/universal-components

In Expo projects

Since react-native link is not available in Expo, we need to load the fonts at the root of the application. Your App.js should look like

import React from "react";
import { View } from "react-native";
import { Icon, Text, PageLoader } from "@kiwicom/universal-components";
import { Font } from "expo";
import OrbitIcons from "@kiwicom/universal-components/lib/fonts/orbit-icons.ttf";
import Roboto from "@kiwicom/universal-components/lib/fonts/Roboto/Roboto-Regular.ttf";
import RobotoItalic from '@kiwicom/universal-components/lib/fonts/Roboto/Roboto-Italic.ttf';
import RobotoBold from '@kiwicom/universal-components/lib/fonts/Roboto/Roboto-Bold.ttf';
import RobotoBoldItalic from '@kiwicom/universal-components/lib/fonts/Roboto/Roboto-BoldItalic.ttf';

export default class App extends React.Component {
  state = {
    fontLoaded: false
  };

  componentDidMount() {
    Font.loadAsync({
      "orbit-icons": OrbitIcons,
      Roboto,
      RobotoItalic,
      RobotoBold,
      RobotoBoldItalic,
    }).then(() => {
      this.setState({ fontLoaded: true });
    });
  }

  render() {
    return this.state.fontLoaded ? (
      <View>
        <Text>Open up App.js to start working on your app!</Text>
        <Icon name="calendar" />
      </View>
    ) : (
      <PageLoader />
    );
  }
}

For more information, consult the documentation on expo.io.

Note: For web projects, you need to ensure you support the .web.js extension. create-react-app already supports it by default.

Contributing

See CONTRIBUTING.md

Repository: https://github.com/kiwicom/universal-components

Forward your suggestions, issues and bugs here.

Current Tags

  • 0.0.17-alpha.0                                ...           alpha (2 years ago)
  • 0.0.11-beta.1                                ...           beta (2 years ago)
  • 0.0.17                                ...           latest (2 years ago)
  • 0.0.10-patch.0                                ...           patch (2 years ago)

32 Versions

  • 0.0.17                                ...           2 years ago
  • 0.0.17-alpha.0                                ...           2 years ago
  • 0.0.16                                ...           2 years ago
  • 0.0.15-alpha.0                                ...           2 years ago
  • 0.0.14                                ...           2 years ago
  • 0.0.13                                ...           2 years ago
  • 0.0.12                                ...           2 years ago
  • 0.0.11                                ...           2 years ago
  • 0.0.11-beta.1                                ...           2 years ago
  • 0.0.11-beta.0                                ...           2 years ago
  • 0.0.11-alpha.0                                ...           2 years ago
  • 0.0.10                                ...           2 years ago
  • 0.0.10-patch.0                                ...           2 years ago
  • 0.0.9                                ...           2 years ago
  • 0.0.9-alpha.3                                ...           2 years ago
  • 0.0.9-alpha.2                                ...           2 years ago
  • 0.0.9-alpha.1                                ...           2 years ago
  • 0.0.9-alpha.0                                ...           2 years ago
  • 0.0.8                                ...           2 years ago
  • 0.0.8-alpha.0                                ...           2 years ago
  • 0.0.7                                ...           2 years ago
  • 0.0.7-beta.0                                ...           2 years ago
  • 0.0.7-alpha.6                                ...           2 years ago
  • 0.0.7-alpha.5                                ...           2 years ago
  • 0.0.7-alpha.4                                ...           2 years ago
  • 0.0.7-alpha.3                                ...           2 years ago
  • 0.0.7-alpha.2                                ...           2 years ago
  • 0.0.7-alpha.0                                ...           2 years ago
  • 0.0.6                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago

Copyright 2014 - 2017 © taobao.org |