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
Copy file name to clipboardExpand all lines: README.md
+34-16Lines changed: 34 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,34 +7,50 @@
7
7
To install the BDP-UI library, you can use the following command:
8
8
9
9
```bash
10
-
yarn add github:bitcoin-dev-project/bdp-ui
10
+
yarn add @bitcoin-dev-project/bdp-ui
11
11
```
12
12
or
13
13
```bash
14
-
npm install github:bitcoin-dev-project/bdp-ui
14
+
npm i @bitcoin-dev-project/bdp-ui
15
15
```
16
16
17
17
## Usage
18
18
19
-
Once installed, you can import the components you need from the library:
19
+
Once installed, you can import the components or icons you need from the library:
20
20
21
-
note: you can set up an entry point in your project config to `/dist` to fix the autocomplete and linting issues. Or in typescript you can use the `paths` property in tsconfig.json to fix the import paths.
21
+
## CSS workaround
22
+
Kindly import the css file to your global entry point.
23
+
Usually, that is `app/layout.tsx`
22
24
23
-
```json
24
-
{
25
-
"compilerOptions": {
26
-
"baseUrl": ".",
27
-
"paths": {
28
-
"bdp-ui/*": ["./node_modules/bdp-ui/dist/*"]
29
-
}
30
-
}
31
-
}
25
+
_note: import the css before your global css so if there are any conflicts your css takes precedence_
26
+
```tsx
27
+
// app/layout.tsx
28
+
...
29
+
import"@bitcoin-dev-project/bdp-ui/styles.css"
30
+
import"./globals.css";
31
+
...
32
+
```
33
+
34
+
If you use tailwind for styling, also point your tailwind config to the library
35
+
i.e
36
+
```tsx
37
+
// tailwind.config.ts
38
+
...
39
+
const config:Config= {
40
+
darkMode: "class",
41
+
content: [
42
+
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
43
+
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
44
+
"node_modules/@bitcoin-dev-project/bdp-ui/dist/**/*.{js,mjs,jsx,ts,tsx}", // add it here
0 commit comments