mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-11 14:08:55 +08:00
6c2c7dcd48
- document folder - full-text search - blob storage - basic edgeless support Co-authored-by: tzhangchi <terry.zhangchi@outlook.com> Co-authored-by: QiShaoXuan <qishaoxuan777@gmail.com> Co-authored-by: DiamondThree <diamond.shx@gmail.com> Co-authored-by: MingLiang Wang <mingliangwang0o0@gmail.com> Co-authored-by: JimmFly <yangjinfei001@gmail.com> Co-authored-by: Yifeng Wang <doodlewind@toeverything.info> Co-authored-by: Himself65 <himself65@outlook.com> Co-authored-by: lawvs <18554747+lawvs@users.noreply.github.com> Co-authored-by: Qi <474021214@qq.com>
67 lines
1.6 KiB
TypeScript
67 lines
1.6 KiB
TypeScript
import { displayFlex, styled } from '@/styles';
|
|
import Loading from '@/components/loading';
|
|
import Modal from '@/ui/modal';
|
|
import { useState } from 'react';
|
|
import { Button } from '@/ui/button';
|
|
import { FavouritedIcon } from '@blocksuite/icons';
|
|
import { toast } from '@/ui/toast';
|
|
export const StyledHeader = styled('div')({
|
|
height: '60px',
|
|
width: '100vw',
|
|
...displayFlex('space-between', 'center'),
|
|
position: 'relative',
|
|
padding: '0 22px',
|
|
borderBottom: '1px solid #e5e5e5',
|
|
});
|
|
|
|
const Affine = () => {
|
|
const [show, setShow] = useState(false);
|
|
return (
|
|
<>
|
|
<StyledHeader>
|
|
<button
|
|
onClick={() => {
|
|
setShow(true);
|
|
}}
|
|
>
|
|
click me!
|
|
</button>
|
|
</StyledHeader>
|
|
<Modal
|
|
open={show}
|
|
onClose={() => {
|
|
setShow(false);
|
|
}}
|
|
>
|
|
<div>hi</div>
|
|
</Modal>
|
|
<Loading />
|
|
|
|
<Button
|
|
icon={<FavouritedIcon />}
|
|
onClick={() => {
|
|
toast('hello, world!!');
|
|
}}
|
|
>
|
|
click me!
|
|
</Button>
|
|
<Button icon={<FavouritedIcon />} type={'primary'}>
|
|
click me!
|
|
</Button>
|
|
<Button icon={<FavouritedIcon />} type={'warning'}>
|
|
click me!
|
|
</Button>
|
|
<Button icon={<FavouritedIcon />} type={'danger'}>
|
|
click me!
|
|
</Button>
|
|
|
|
<Button icon={<FavouritedIcon />}></Button>
|
|
<Button icon={<FavouritedIcon />} shape="round"></Button>
|
|
<Button loading={true}></Button>
|
|
<Button loading={true} type="primary"></Button>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default Affine;
|