-
-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dependabot/npm_and_yarn/eslint-8.35.0
- Loading branch information
Showing
36 changed files
with
777 additions
and
385 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { defineConfig } from 'dumi'; | ||
import path from 'path'; | ||
|
||
export default defineConfig({ | ||
alias: { | ||
'rc-drawer$': path.resolve('src'), | ||
'rc-drawer/es': path.resolve('src'), | ||
}, | ||
mfsu: false, | ||
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'], | ||
themeConfig: { | ||
name: 'Drawer', | ||
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4', | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
export default { | ||
cjs: 'babel', | ||
esm: { type: 'babel', importLibToEs: true }, | ||
preCommit: { | ||
eslint: true, | ||
prettier: true, | ||
}, | ||
runtimeHelpers: true, | ||
}; | ||
import { defineConfig } from 'father'; | ||
|
||
export default defineConfig({ | ||
plugins: ['@rc-component/father-plugin'], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,7 @@ storybook | |
.umi-production | ||
.umi-test | ||
.env.local | ||
|
||
# dumi | ||
.dumi/tmp | ||
.dumi/tmp-production |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# ChangeLog | ||
|
||
<embed src="../CHANGELOG.md"></embed> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## base | ||
--- | ||
title: base | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/base.tsx"> | ||
<code src="../examples/base.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: bodyProps | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/bodyProps.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
## change-remove | ||
--- | ||
title: change-remove | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/change-remove.tsx"> | ||
|
||
<code src="../examples/change-remove.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
## change | ||
--- | ||
title: change | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/change.tsx"> | ||
|
||
<code src="../examples/change.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
## Force Render | ||
--- | ||
title: Force Render | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/forceRender.tsx"> | ||
|
||
<code src="../examples/forceRender.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
## getContainer | ||
--- | ||
title: getContainer | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/getContainer.tsx"> | ||
<code src="../examples/getContainer-false.tsx"> | ||
|
||
<code src="../examples/getContainer.tsx"></code> | ||
<code src="../examples/getContainer-false.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
## multiple | ||
--- | ||
title: multiple | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/multiple.tsx"> | ||
|
||
<code src="../examples/multiple.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
## no-mask | ||
--- | ||
title: no-mask | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/no-mask.tsx"> | ||
|
||
<code src="../examples/no-mask.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
## placement | ||
--- | ||
title: placement | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/placement.tsx"> | ||
|
||
<code src="../examples/placement.tsx"></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* eslint-disable @typescript-eslint/no-unused-vars */ | ||
import React, { useState } from 'react'; | ||
import Drawer from 'rc-drawer'; | ||
import motionProps from './motion'; | ||
|
||
const Demo = () => { | ||
const [open, setOpen] = useState(false); | ||
const onTouchEnd = () => { | ||
setOpen(false); | ||
}; | ||
const onSwitch = () => { | ||
setOpen(c => !c); | ||
}; | ||
return ( | ||
<div> | ||
<Drawer | ||
open={open} | ||
// defaultOpen | ||
onClose={onTouchEnd} | ||
afterOpenChange={(c: boolean) => { | ||
console.log('transitionEnd: ', c); | ||
}} | ||
placement="right" | ||
// width={400} | ||
width="60%" | ||
// Motion | ||
{...motionProps} | ||
onMouseEnter={() => { | ||
console.log('mouseEnter'); | ||
}} | ||
onMouseLeave={() => { | ||
console.log('mouseLeave'); | ||
}} | ||
> | ||
content | ||
</Drawer> | ||
<div> | ||
<button onClick={onSwitch}>打开</button> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
export default Demo; |
Oops, something went wrong.