Skip to content

Commit

Permalink
chore: So many chores (#460)
Browse files Browse the repository at this point in the history
* fix: fix dev

* demo

* chore: fix

* demo redirect

* fix

* ci

* ci
  • Loading branch information
yoyo837 authored Oct 18, 2023
1 parent 06cb799 commit d023229
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 8 deletions.
10 changes: 10 additions & 0 deletions .dumi/app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Navigate } from 'dumi';
import * as React from 'react';

export function patchClientRoutes({ routes }) {
routes[0].children.unshift({
id: 'demo-redirect',
path: '/demo',
element: <Navigate to="arrow-content" />,
});
}
6 changes: 6 additions & 0 deletions .dumi/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "../tsconfig.json",
"include": [
"**/*"
]
}
8 changes: 4 additions & 4 deletions .github/workflows/react-component-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: actions/setup-node@v1
with:
node-version: '12'
node-version: '14'

- name: cache package-lock.json
uses: actions/cache@v2
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
- name: install
if: steps.node_modules_cache_id.outputs.cache-hit != 'true'
run: npm ci

lint:
runs-on: ubuntu-latest
steps:
Expand All @@ -66,7 +66,7 @@ jobs:
run: npm run lint

needs: setup

compile:
runs-on: ubuntu-latest
steps:
Expand All @@ -89,7 +89,7 @@ jobs:
run: npm run compile

needs: setup

coverage:
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ ReactDOM.render(
## Examples

`npm start` and then go to
<http://localhost:8007/examples>
<http://localhost:8000/demo>

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

## API

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
],
"scripts": {
"compile": "father build && lessc assets/bootstrap.less assets/bootstrap.css && lessc assets/bootstrap_white.less assets/bootstrap_white.css",
"prepare": "dumi setup",
"docs:build": "dumi build",
"docs:deploy": "gh-pages -d dist",
"lint": "eslint src/ --ext .tsx,.ts,.jsx,.js",
Expand All @@ -51,7 +52,7 @@
"@types/react-dom": "^18.0.10",
"@types/warning": "^3.0.0",
"cross-env": "^7.0.0",
"dumi": "^2.1.1",
"dumi": "^2.2.13",
"eslint": "^7.1.0",
"father": "^4.0.0",
"gh-pages": "^3.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const Tooltip = (props: TooltipProps, ref: React.Ref<TooltipRef>) => {
} = props;

const triggerRef = useRef<TriggerRef>(null);
useImperativeHandle(ref, () => triggerRef.current);
useImperativeHandle(ref, () => triggerRef.current as TriggerRef);

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

0 comments on commit d023229

Please sign in to comment.