Skip to content

Commit d023229

Browse files
authored
chore: So many chores (#460)
* fix: fix dev * demo * chore: fix * demo redirect * fix * ci * ci
1 parent 06cb799 commit d023229

File tree

6 files changed

+25
-8
lines changed

6 files changed

+25
-8
lines changed

.dumi/app.tsx

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { Navigate } from 'dumi';
2+
import * as React from 'react';
3+
4+
export function patchClientRoutes({ routes }) {
5+
routes[0].children.unshift({
6+
id: 'demo-redirect',
7+
path: '/demo',
8+
element: <Navigate to="arrow-content" />,
9+
});
10+
}

.dumi/tsconfig.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"include": [
4+
"**/*"
5+
]
6+
}

.github/workflows/react-component-ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
- uses: actions/setup-node@v1
1717
with:
18-
node-version: '12'
18+
node-version: '14'
1919

2020
- name: cache package-lock.json
2121
uses: actions/cache@v2
@@ -43,7 +43,7 @@ jobs:
4343
- name: install
4444
if: steps.node_modules_cache_id.outputs.cache-hit != 'true'
4545
run: npm ci
46-
46+
4747
lint:
4848
runs-on: ubuntu-latest
4949
steps:
@@ -66,7 +66,7 @@ jobs:
6666
run: npm run lint
6767

6868
needs: setup
69-
69+
7070
compile:
7171
runs-on: ubuntu-latest
7272
steps:
@@ -89,7 +89,7 @@ jobs:
8989
run: npm run compile
9090

9191
needs: setup
92-
92+
9393
coverage:
9494
runs-on: ubuntu-latest
9595
steps:

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ ReactDOM.render(
6464
## Examples
6565

6666
`npm start` and then go to
67-
<http://localhost:8007/examples>
67+
<http://localhost:8000/demo>
6868

69-
Online examples: <https://react-component.github.io/tooltip/examples/>
69+
Online demo: <https://react-component.github.io/tooltip/demo>
7070

7171
## API
7272

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
],
3131
"scripts": {
3232
"compile": "father build && lessc assets/bootstrap.less assets/bootstrap.css && lessc assets/bootstrap_white.less assets/bootstrap_white.css",
33+
"prepare": "dumi setup",
3334
"docs:build": "dumi build",
3435
"docs:deploy": "gh-pages -d dist",
3536
"lint": "eslint src/ --ext .tsx,.ts,.jsx,.js",
@@ -51,7 +52,7 @@
5152
"@types/react-dom": "^18.0.10",
5253
"@types/warning": "^3.0.0",
5354
"cross-env": "^7.0.0",
54-
"dumi": "^2.1.1",
55+
"dumi": "^2.2.13",
5556
"eslint": "^7.1.0",
5657
"father": "^4.0.0",
5758
"gh-pages": "^3.1.0",

src/Tooltip.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const Tooltip = (props: TooltipProps, ref: React.Ref<TooltipRef>) => {
7474
} = props;
7575

7676
const triggerRef = useRef<TriggerRef>(null);
77-
useImperativeHandle(ref, () => triggerRef.current);
77+
useImperativeHandle(ref, () => triggerRef.current as TriggerRef);
7878

7979
const extraProps: Partial<TooltipProps & TriggerProps> = { ...restProps };
8080
if ('visible' in props) {

0 commit comments

Comments
 (0)