Skip to content

Commit 6011c18

Browse files
feat: add styles to bundle rm inject styles (#31)
1 parent 9d72911 commit 6011c18

File tree

6 files changed

+15
-21
lines changed

6 files changed

+15
-21
lines changed

package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,24 @@
55
"main": "./dist/index.js",
66
"module": "./dist/index.mjs",
77
"types": "./dist/index.d.ts",
8+
"style": "./dist/styles.css",
89
"license": "MIT",
910
"files": [
1011
"dist",
1112
"README.md"
1213
],
1314
"exports": {
1415
".": {
16+
"types": "./dist/index.d.ts",
1517
"import": "./dist/index.mjs",
16-
"require": "./dist/index.js",
17-
"types": "./dist/index.d.ts"
18+
"require": "./dist/index.js"
1819
},
1920
"./icons": {
21+
"types": "./dist/icons.d.ts",
2022
"import": "./dist/icons.mjs",
21-
"require": "./dist/icons.js",
22-
"types": "./dist/icons.d.ts"
23-
}
23+
"require": "./dist/icons.js"
24+
},
25+
"./styles.css": "./dist/styles.css"
2426
},
2527
"homepage": "https://github.com/bitcoin-dev-project/bdp-ui",
2628
"repository": {

src/components/button/Button.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// src/components/Button/Button.tsx
22

33
import React from "react";
4-
import "../../styles/tailwind.output.css";
5-
64
export interface ButtonProps {
75
label: string;
86
onClick?: () => void;

src/components/footer/Footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export interface FooterRootProps
1313
}
1414

1515
const Separator = () => (
16-
<div className="h-5 border xl:h-6 xl:border-2 border-custom-stroke hidden xl:block" />
16+
<div className="h-5 border xl:h-6 xl:border-2 border-bdp-stroke hidden xl:block" />
1717
);
1818

1919
const Footer: React.FC<FooterRootProps> & {

src/components/footer/FooterAbout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const FooterAbout = (props: React.PropsWithChildren<FooterAboutProps>) => {
3232
href={entityLink ?? "https://bitcoindevs.xyz/"}
3333
target="_blank"
3434
rel="noreferrer"
35-
className="underline font-medium text-custom-brightOrange-100"
35+
className="underline font-medium text-bdp-brightOrange-100"
3636
>
3737
{entityName ?? "Bitcoin Dev Project"}
3838
</a>

tailwind.config.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,9 @@ module.exports = {
33
darkMode: "class",
44
content: ['./src/**/*.{js,jsx,ts,tsx}'],
55
theme: {
6-
fontFamily: {
7-
sans: ["ui-sans-serif", "system-ui"],
8-
serif: ["ui-serif", "Georgia"],
9-
mono: ["ui-monospace", "SFMono-Regular"],
10-
geist: ['"Geist Sans"', "sans-serif"],
11-
mona: ['"Mona Sans"', "sans-serif"],
12-
},
136
extend: {
14-
boxShadow: {
15-
"custom-sm": "2px 3px 10px 0px rgba(255, 128, 0, 0.18);",
16-
},
177
colors: {
18-
custom: {
8+
bdp: {
199
background: "var(--background)",
2010
"hover-primary": "var(--hover-primary)",
2111
"hover-state": "var(--hover-state)",

tsup.config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { defineConfig } from 'tsup';
2+
import fs from 'fs';
23

34
export default defineConfig({
45
entry: ['src/index.ts', 'src/icons.ts'],
@@ -9,5 +10,8 @@ export default defineConfig({
910
sourcemap: true,
1011
clean: true,
1112
external: ['react', 'react-dom'],
12-
injectStyle: true,
13+
injectStyle: false,
14+
async onSuccess() {
15+
await fs.promises.copyFile('src/styles/tailwind.output.css', 'dist/styles.css');
16+
},
1317
});

0 commit comments

Comments
 (0)