Skip to content

Commit fec6bb1

Browse files
committed
Typescript bundle fix
1 parent 2528b4d commit fec6bb1

File tree

5 files changed

+30
-29
lines changed

5 files changed

+30
-29
lines changed

.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ module.exports = {
1717
allowJs: false,
1818
jsx: "react",
1919
declaration: true,
20-
moduleResolution: "node",
2120
forceConsistentCasingInFileNames: true,
2221
noImplicitReturns: true,
2322
noImplicitThis: true,
@@ -27,6 +26,7 @@ module.exports = {
2726
noUnusedLocals: false,
2827
noUnusedParameters: true,
2928
esModuleInterop: true,
29+
typeRoots: ["../node_modules/@types", "../types"],
3030
},
3131
},
3232
},

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Cristiano Raimondi
3+
Copyright (c) 2022 Cristiano Raimondi
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-usage-bar",
3-
"version": "1.0.8",
3+
"version": "1.0.9",
44
"description": "Usage bar, graphic component for React",
55
"main": "build/index.js",
66
"module": "build/index.es.js",

src/UsageBarDark.stories.tsx

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import * as React from "react"
22
import UsageBar from "./UsageBar"
33

4-
export default {
5-
title: "Usage Bar Dark",
6-
component: UsageBar,
7-
parameters: {}
8-
}
4+
export default {
5+
title: "Usage Bar Dark",
6+
component: UsageBar,
7+
parameters: {},
8+
}
99

1010
const items = [
1111
{
1212
name: "UI",
1313
value: 10,
14-
color: "#E75D04",
14+
color: "#E85D04",
1515
},
1616
{
1717
name: "Photos",
@@ -32,40 +32,40 @@ const items = [
3232
]
3333

3434
export const darkMode = () => (
35-
<div style={{backgroundColor: '#212121'}}>
35+
<div style={{ backgroundColor: "#212121" }}>
3636
<UsageBar darkMode items={items} total={100} />
3737
</div>
3838
)
3939

4040
export const darkModeWithoutLabels = () => (
41-
<div style={{backgroundColor: '#212121'}}>
42-
<UsageBar removeLabels darkMode items={items} total={100} />
43-
</div>
44-
)
41+
<div style={{ backgroundColor: "#212121" }}>
42+
<UsageBar removeLabels darkMode items={items} total={100} />
43+
</div>
44+
)
4545

4646
export const darkModeWithPercentages = () => (
47-
<div style={{backgroundColor: '#212121'}}>
48-
<UsageBar showPercentage darkMode items={items} total={100} />
49-
</div>
47+
<div style={{ backgroundColor: "#212121" }}>
48+
<UsageBar showPercentage darkMode items={items} total={100} />
49+
</div>
5050
)
5151

5252
export const darkModeCompact = () => (
53-
<div style={{backgroundColor: '#212121'}}>
54-
<UsageBar showPercentage compactLayout darkMode items={items} total={100} />
55-
</div>
53+
<div style={{ backgroundColor: "#212121" }}>
54+
<UsageBar showPercentage compactLayout darkMode items={items} total={100} />
55+
</div>
5656
)
5757

5858
export const darkModeCompactWithoutLabels = () => (
59-
<div style={{backgroundColor: '#212121'}}>
60-
<UsageBar removeLabels compactLayout darkMode items={items} total={100} />
61-
</div>
59+
<div style={{ backgroundColor: "#212121" }}>
60+
<UsageBar removeLabels compactLayout darkMode items={items} total={100} />
61+
</div>
6262
)
6363

6464
export const error = () => (
65-
<>
66-
<p>If sum of values exceeds total.</p>
67-
<div style={{backgroundColor: '#212121'}}>
68-
<UsageBar items={items} total={50} />
69-
</div>
70-
</>
65+
<>
66+
<p>If sum of values exceeds total.</p>
67+
<div style={{ backgroundColor: "#212121" }}>
68+
<UsageBar items={items} total={50} />
69+
</div>
70+
</>
7171
)

types/types.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare module "react-usage-bar"

0 commit comments

Comments
 (0)