0.18.1 • Published 3 months ago

@xtreamsrl/react-ui-kit v0.18.1

Weekly downloads
-
License
-
Repository
github
Last release
3 months ago

@xtreamsrl/react-ui-kit

This package exposes React components to facilitate the frontend development of web applications especially when the level of customization is low.

Installation

npm install @xtreamsrl/react-ui-kit

Usage

To use the library it is necessary to complete the following step. You need to add the entire content of the augmentation folder to the include field of the tsconfig.json file.

"./node_modules/@xtreamsrl/react-ui-kit/src/theme/augmentation/*.d.ts"

For example:

{
  "include": ["src", "./node_modules/@xtreamsrl/react-ui-kit/src/theme/augmentation/*.d.ts"]
}

Any third party dependencies referenced by the augmentation/*.d.ts files need to be installed:

npm install @mui/material

In order to exploit all the components of the library it is required to import ThemeProvider and createTheme from the @xtreamsrl/react-ui-kit library.

The entire application must be wrapped in the ThemeProvider component, which accepts a theme prop of type Theme (see below).

This theme object is configured only once using the createTheme function, which accepts a ThemeOptions object. Here is an example of theme configuration and provision:

import {createTheme, ThemeProvider} from "@xtreamsrl/react-ui-kit";

const theme = createTheme(
  {
    typography: {
      fontFamily: "Inter"
    },
    palette: {
      brand: {
        1: '#FFEBEB',
        2: '#FFDBDC',
        3: '#FFC7C8',
        4: '#FFB8B9',
        5: '#FFA3A5',
        6: '#FF8F91',
        7: '#FF8082',
        8: '#FF6B6E',
        9: '#FF5A5E',
        10: '#9B171C',
        11: '#6F1114',
        12: '#420A0C'
      }
    }
  }
)

export function App() {
  return <ThemeProvider theme={theme}>
    <MainApp/>
  </ThemeProvider>
}

At this point you are able to use all the components of the library as needed. It will be sufficient to import them from the library and use them as any other React component. Import components singularly to avoid your bundle becoming too large, so instead of:

import {Button} from "@xtreamsrl/react-ui-kit";

always prefer:

import {Button} from "@xtreamsrl/react-ui-kit/Button";

Who we are

0.18.1

3 months ago

0.18.0

3 months ago

0.15.0

4 months ago

0.16.0

4 months ago

0.17.0

4 months ago

0.14.0

8 months ago

0.13.1

9 months ago

0.13.0

1 year ago

0.12.0

1 year ago

0.11.0

1 year ago

0.10.3

1 year ago

0.10.2

1 year ago

0.10.1

1 year ago

0.10.0

1 year ago

0.9.0

1 year ago

0.8.4

1 year ago

0.8.3

1 year ago

0.8.2

1 year ago

0.8.1

1 year ago

0.8.0

1 year ago

0.7.0

1 year ago

0.6.1

1 year ago

0.6.0

1 year ago

0.5.1

1 year ago

0.5.0

1 year ago

0.4.0

1 year ago

0.3.0

1 year ago

0.2.0

2 years ago

0.1.0

2 years ago