Wondering what’s next for npm?Check out our public roadmap! »

    @tecommons/ui

    1.0.8 • Public • Published

    Overview

    This library is a fork from aragonUI library used to build user interfaces. The theme of the library was customized for being used in the TokenEngineer projects from now on. It provides the components needed to build experiences that feel integrated with TEC ecosystem, and can be used both client or server side.

    The complete documentation can be found on the aragonUI website.

    Getting Started

    If you are unfamiliar with aragonUI, we recommend you to start with the getting started page. If you only want to know how to add aragonUI to your project, have a look at the quick setup:

    Quick setup

    Install tecUI alongside styled-components from npm::

    npm install --save @tecommons/ui styled-components

    Copy its assets into your public directory:

    npx copy-aragon-ui-assets ./public

    Wrap your app with the Main component:

    import React from 'react'
    import { Main } from '@tecommons/ui'
    
    function App() {
      return (
        <Main>
          <h1>Hello aragonUI!</h1>
        </Main>
      )
    }

    Your project is now ready to use TEC-UI. 💫

    Open https://ui.aragon.org/ to see the list of the available components and learn how to use them.

    Assets

    TEC-UI require some assets (e.g. fonts) in order to work properly. These need to be copied where they can be accessed by the library, like the public/ directory of a project using Create React App.

    Copy these assets using the provided copy-aragon-ui-assets command:

    npx copy-aragon-ui-assets ./public

    By default, it will create a directory named aragon-ui in the specified directory.

    This emplacement is communicated to the library through the <Main> component. The default path is ./aragon-ui/, but you can change it using the assetsUrl prop:

    import { Main } from '@tecommons/ui'
    
    const App = () => (
      <Main assetsUrl="http://example.com/aragon-ui-assets/">
        <h1>Hello aragonUI!</h1>
      </Main>
    )

    You may also want to add it as a build step in your project, so that tecUI can be upgraded without having to worry about this.

    "scripts": {
      "sync-assets": "copy-aragon-ui-assets ./public",
      "build": "npm run sync-assets && react-scripts build",
      "start": "npm run sync-assets && react-scripts start"
    }

    See copy-aragon-ui-assets -h for more information.

    Build and Develop

    Please have a look at CONTRIBUTING.md.

    License

    MIT, see LICENSE.

    Install

    npm i @tecommons/ui

    DownloadsWeekly Downloads

    2

    Version

    1.0.8

    License

    MIT

    Unpacked Size

    8.46 MB

    Total Files

    1492

    Last publish

    Collaborators

    • avatar
    • avatar