You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library is an opinionated collection of React UI components and styles, to be shared across applications built within this organization.
4
+
5
+
## Installation
6
+
7
+
You can install the library using following command:
8
+
9
+
```shell
10
+
# npm
11
+
npm install @fidlabs/common-react-ui
12
+
13
+
# pnpm
14
+
pnpm install @fidlabs/common-react-ui
15
+
16
+
# yarn
17
+
yarn add @fidlabs/common-react-ui
18
+
```
19
+
20
+
## Setup
21
+
22
+
### Styles
23
+
24
+
To use the library you need to import following styles:
25
+
26
+
```tsx
27
+
import"@fidlabs/common-react-ui/global.css";
28
+
```
29
+
30
+
or in your global styles file
31
+
32
+
```css
33
+
@import"@fidlabs/common-react-ui/global.css";
34
+
```
35
+
36
+
### Fonts
37
+
38
+
The library does not setup font by default. You can set the font by using the `--font-sans` css variable. We recommend using the "Montserrat" font as this is the go to font used when developing this library.
39
+
40
+
If you are using Next.js (recommended), you can set up the font in the following way:
41
+
42
+
```tsx
43
+
// Somehwere in root layout
44
+
45
+
import { Montserrat } from"next/font/google";
46
+
47
+
// ...
48
+
49
+
const font =Montserrat({
50
+
variable: "--font-sans",
51
+
subsets: ["latin"],
52
+
});
53
+
54
+
// The later set the classname on the HTML element
0 commit comments