Skip to content

Commit 9e606a5

Browse files
authored
Merge pull request #8 from happy-func/feature_global_220328
Feature global 220328
2 parents 4a2903b + 4213626 commit 9e606a5

File tree

10 files changed

+7
-6
lines changed

10 files changed

+7
-6
lines changed

docs/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ $ npm i react-swim-button
1313
$ yarn add react-swim-button
1414
```
1515

16-
<API src="../src/Button/index.tsx"></API>
16+
<API src="../src/index.tsx"></API>
1717

1818
## Usage
1919

@@ -57,6 +57,7 @@ export default () => {
5757
<div>
5858
{Array.from({ length: 2 }).map((_, index) => (
5959
<ReactSwimButton
60+
key={index}
6061
primary="#ff7426"
6162
active={activeAt === index}
6263
style={{ marginRight: 16 }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-swim-button",
33
"license": "MIT",
4-
"version": "1.0.5",
4+
"version": "1.0.6",
55
"scripts": {
66
"start": "dumi dev",
77
"docs:build": "dumi build",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/index.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/Button/index.tsx renamed to src/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import StyledButtonIcon from './StyledButtonIcon';
88
import StyledButtonWave from './StyledButtonWave';
99
import StyledLoading from './StyledLoading';
1010

11-
export default function ReactSwimButton(props: IProps) {
11+
function ReactSwimButton(props: ReactSwimButtonProps) {
1212
const { primary = `#2b65f4`, active, onClick, children, className, style, icon, loading } = props;
1313
const waveRef = useRef(null);
1414
function animate(time: number | undefined) {
@@ -98,7 +98,7 @@ function Loading() {
9898
);
9999
}
100100

101-
export interface IProps {
101+
export interface ReactSwimButtonProps {
102102
/**
103103
* @description set primary color
104104
* @default #2b65f4
@@ -132,3 +132,5 @@ export interface IProps {
132132
*/
133133
loading?: boolean;
134134
}
135+
136+
export default ReactSwimButton;

0 commit comments

Comments
 (0)