init: the first public commit for AFFiNE

This commit is contained in:
DarkSky
2022-07-22 15:49:21 +08:00
commit e3e3741393
1451 changed files with 108124 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
import { styled } from '@toeverything/components/ui';
import { WithEditorSelectionType } from '../menu/inline-menu/types';
import { AddCommentActions } from './AddCommentActions';
import { AddCommentInput } from './AddCommentInput';
import { useAddComment } from './use-add-comment';
export const AddComment = (props: WithEditorSelectionType) => {
const {
currentComment,
setCurrentComment,
createComment,
handleSubmitCurrentComment,
} = useAddComment(props);
return (
<StyledContainerForAddComment>
<AddCommentInput
comment={currentComment}
setComment={setCurrentComment}
createComment={createComment}
handleSubmitCurrentComment={handleSubmitCurrentComment}
/>
<AddCommentActions
{...props}
createComment={createComment}
handleSubmitCurrentComment={handleSubmitCurrentComment}
/>
</StyledContainerForAddComment>
);
};
const StyledContainerForAddComment = styled('div')(({ theme }) => {
return {
// display: 'flex',
margin: theme.affine.spacing.main,
};
});