- Node 8.12.0 or later (https://nodejs.org/en/)
- VSCode (https://code.visualstudio.com/), or other IDE with typescript support (like WebStorm)
- yarn package manager (https://yarnpkg.com/en/)
- Any GIT client (standalone, or embedded into your IDE)
Clone the repository.
To build and then start the project use:
yarn yarn start Then open your browser on http://localhost:3000/
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
We build styles using SCSS in combination with CSS modules.
If you have the following MyComponent.module.scss file:
.my-header { color: red; } You can import and use selectors from it from your tsx file:
import * as React from 'react'; import * as css from './MainPage.module.scss'; export const MyComponent = <div className={ css.mainPanel }> css.mainPanel will be equal to auto-generated class name, which is guaranteed to be unique across the project. In development mode, selector will contain the name of the file and hash, like "MainPage_mainPanel__140Pj". In production mode, selectors will be made short to reduce size.
If you need an usual global selector, use:
:global(.my-selector) Read more on CSS Modules here: https://github.com/css-modules/css-modules
Read more on SCSS here: https://sass-lang.com/
SVG files can be imported like this:
import { ReactComponent as myIcon } from 'icons/myIcon.svg' After this, myIcon.svg will be included in SVG sprite as a symbol, and myIcon variable will contain and object with meta-information about the SVG file, like { id, url, viewBox } or like React.SFC.
You can learn more in the Create React App documentation.
To learn about UII, visit UUI documentation website
To learn React, check out the React documentation.