0.47.6 • Published 4 years ago

treact-ui v0.47.6

Weekly downloads
-
License
-
Repository
github
Last release
4 years ago

Treact UI Components

Requirements

Installation & Usage

Project Setup:

create-react-app my-app
cd my-app
touch .npmrc

Copy the content of this proejct's .npmrc.azure file to your project's .npmrc and enter your credentials (password etc.) in this file for the placeholders.

Then on command line:

npm install @tls/treact-ui styled-components

In your global CSS:

html,
body {
  font-size: 1px;
}

And last but not least, in one of your React components:

import React from 'react';

import { Atoms } from '@tls/treact-ui';

const { ContentButtonPrimary } = Atoms;

const App = () => {
  return (
    <div>
      <ContentButtonPrimary label="Click me" />
    </div>
  );
};

export default App;

You are ready to go.

Relative Imports

Keep the bundle size small with relative imports:

import React from 'react';

import ContentButtonPrimary from '@tls/treact-ui/lib/ContentButtonPrimary';

const App = () => {
  return (
    <div>
      <ContentButtonPrimary label="Click me" />
    </div>
  );
};

export default App;

Contribution to Library

Setup:

  • git clone git@gitlab.com:TRUMPF-corp/treui/ui-components.git
  • cd ui-components
  • follow .npmrc
  • npm install

.npmrc

Add npm credentials from azure feed to your local .npmrc file. The credentials can be obtained by going to the TcXLibrary Feed: Connect To Feed > NPM > Generate NPM Credentials.

  • Rename .npmrc.azure to .npmrc
  • Add your password credentials from Azure Dev Ops to .npmrc

Scripts

Run Storybook:

  • npm run storybook

Build Storybook:

  • npm install -g http-server
  • npm run storybook-build
  • http-server dist/

Build Library:

  • npm run build

Run Tests:

  • npm test
  • npm run test:watch
0.47.5

4 years ago

0.47.6

4 years ago

0.47.4

4 years ago

0.47.3

4 years ago

0.47.1

4 years ago

0.47.2

4 years ago

0.47.0

4 years ago

0.8.0

6 years ago

0.7.0

6 years ago

0.6.0

6 years ago

0.5.0

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago