-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
99 additions
and
62 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,17 @@ | ||
import React from 'react'; | ||
|
||
export interface DialogProps { | ||
header?: React.ReactNode; | ||
title?: React.ReactNode; | ||
content?: React.ReactNode; | ||
/** Dialog关闭时的回调 */ | ||
onClose?: () => void; | ||
} | ||
|
||
const Dialog: React.FC<DialogProps> = () => { | ||
return <>1</>; | ||
}; | ||
|
||
Dialog.displayName = 'Dialog'; | ||
|
||
export default Dialog; |
Empty file.
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
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,37 +1,16 @@ | ||
.ygm-mask { | ||
z-index: 999; | ||
$class-prefix-mask: 'ygm-mask'; | ||
|
||
.#{$class-prefix-mask} { | ||
--z-index: 999; | ||
--background: rgba(0, 0, 0, 0.55); | ||
|
||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
z-index: var(--z-index); | ||
width: 100%; | ||
height: 100%; | ||
display: block; | ||
background: rgba(0, 0, 0, 0.55); | ||
background: var(--background); | ||
overflow: hidden; | ||
|
||
&-enter { | ||
opacity: 0; | ||
} | ||
|
||
&-enter-active { | ||
opacity: 1; | ||
transition: opacity 0.3s ease-in; | ||
} | ||
|
||
&-enter-done { | ||
opacity: 1; | ||
} | ||
|
||
&-exit { | ||
opacity: 1; | ||
} | ||
|
||
&-exit-active { | ||
opacity: 0; | ||
transition: opacity 0.3s ease-in; | ||
} | ||
|
||
&-exit-done { | ||
opacity: 0; | ||
} | ||
} |
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,26 @@ | ||
import React from 'react'; | ||
import { Meta } from '@storybook/react'; | ||
|
||
import Dialog from '@/dialog'; | ||
|
||
import DemoWrap from '../../demos/demo-wrap'; | ||
import DemoBlock from '../../demos/demo-block'; | ||
|
||
const DialogStory: Meta = { | ||
title: '反馈/Dialog 弹出框', | ||
component: Dialog, | ||
}; | ||
|
||
export const Basic = () => { | ||
return ( | ||
<DemoWrap> | ||
<DemoBlock title="基础用法" style={{ padding: 20 }}> | ||
<Dialog title="标题" content="代码是写出来给人看的,附带能在机器上运行" /> | ||
</DemoBlock> | ||
</DemoWrap> | ||
); | ||
}; | ||
|
||
Basic.storyName = '基本用法'; | ||
|
||
export default DialogStory; |
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