mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-05 19:40:30 +08:00
feat: add contact modal
This commit is contained in:
@@ -1,21 +1,14 @@
|
||||
import React from 'react';
|
||||
import { useState } from 'react';
|
||||
import { StyledFAQ, StyledIconWrapper, StyledFAQWrapper } from './style';
|
||||
import { ContactIcon, HelpIcon, KeyboardIcon } from './icons';
|
||||
import Grow from '@mui/material/Grow';
|
||||
import { Tooltip } from '../tooltip';
|
||||
import { Modal } from '@/components/modal';
|
||||
import ContactModal from '@/components/contact-modal';
|
||||
const Contact = () => {
|
||||
const [openModal, setOpenModal] = React.useState(false);
|
||||
const [openModal, setOpenModal] = useState(false);
|
||||
return (
|
||||
<>
|
||||
<Modal
|
||||
open={openModal}
|
||||
onClose={() => {
|
||||
setOpenModal(false);
|
||||
}}
|
||||
>
|
||||
<div>modal content</div>
|
||||
</Modal>
|
||||
<ContactModal open={openModal} onClose={() => setOpenModal(false)} />
|
||||
<Tooltip content="Contact with us" placement="left-end">
|
||||
<StyledIconWrapper
|
||||
onClick={() => {
|
||||
@@ -29,31 +22,34 @@ const Contact = () => {
|
||||
);
|
||||
};
|
||||
export const FAQ = () => {
|
||||
const [showContent, setShowContent] = React.useState(false);
|
||||
return (
|
||||
<StyledFAQ
|
||||
className=""
|
||||
onMouseEnter={() => {
|
||||
setShowContent(true);
|
||||
}}
|
||||
onMouseLeave={() => {
|
||||
setShowContent(false);
|
||||
}}
|
||||
>
|
||||
<Grow in={showContent}>
|
||||
<StyledFAQWrapper>
|
||||
<Contact />
|
||||
<Tooltip content="Keyboard shorts" placement="left-end">
|
||||
<StyledIconWrapper>
|
||||
<KeyboardIcon />
|
||||
</StyledIconWrapper>
|
||||
</Tooltip>
|
||||
</StyledFAQWrapper>
|
||||
</Grow>
|
||||
const [showContent, setShowContent] = useState(false);
|
||||
|
||||
<StyledIconWrapper style={{ margin: '0', cursor: 'inherit' }}>
|
||||
<HelpIcon />
|
||||
</StyledIconWrapper>
|
||||
</StyledFAQ>
|
||||
return (
|
||||
<>
|
||||
<StyledFAQ
|
||||
className=""
|
||||
onMouseEnter={() => {
|
||||
setShowContent(true);
|
||||
}}
|
||||
onMouseLeave={() => {
|
||||
setShowContent(false);
|
||||
}}
|
||||
>
|
||||
<Grow in={showContent}>
|
||||
<StyledFAQWrapper>
|
||||
<Contact />
|
||||
<Tooltip content="Keyboard shorts" placement="left-end">
|
||||
<StyledIconWrapper>
|
||||
<KeyboardIcon />
|
||||
</StyledIconWrapper>
|
||||
</Tooltip>
|
||||
</StyledFAQWrapper>
|
||||
</Grow>
|
||||
|
||||
<StyledIconWrapper style={{ margin: '0', cursor: 'inherit' }}>
|
||||
<HelpIcon />
|
||||
</StyledIconWrapper>
|
||||
</StyledFAQ>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user