diff --git a/src/stories/chat/parts/commentBox.tsx b/src/stories/chat/parts/commentBox.tsx index cab1d161..6c98922b 100644 --- a/src/stories/chat/parts/commentBox.tsx +++ b/src/stories/chat/parts/commentBox.tsx @@ -23,14 +23,14 @@ import { useChatContext } from "../context/chatContext"; const ChatBoxContainer = styled.div` display: flex; border-top: 1px solid ${({ theme }) => theme.palette.grey[200]}; - margin: ${({ theme }) => `0 -${theme.space.md}`}; - padding: ${({ theme }) => theme.space.md}; + margin: ${({ theme }) => `0 -${theme.space.base * 4}px`}; + padding: ${({ theme }) => `${theme.space.base * 4}px ${theme.space.sm} 0`}; `; const EditorContainer = styled(FauxInput)` margin-left: ${({ theme }) => theme.space.sm}; + padding: ${({ theme }) => `${theme.space.xxs} ${theme.space.xs}`}; .ProseMirror { - padding: ${({ theme }) => `${theme.space.xxs} ${theme.space.xs}`}; background-color: #fff; min-height: 36px; outline: none; @@ -59,11 +59,12 @@ export const CommentBox = ({ }: PropsWithChildren) => { const { children, hasInlineMenu, bubbleOptions, author } = props; - const { setEditor, triggerSave } = useChatContext(); + const { editor, setEditor, triggerSave } = useChatContext(); const onKeyDown = (event: ReactKeyboardEvent) => { if ((event.ctrlKey || event.metaKey) && event.key === "Enter") { triggerSave(); + editor?.commands.clearContent(); } }; diff --git a/src/stories/chat/parts/containers.tsx b/src/stories/chat/parts/containers.tsx index 00d0c32a..3a046e10 100644 --- a/src/stories/chat/parts/containers.tsx +++ b/src/stories/chat/parts/containers.tsx @@ -3,7 +3,7 @@ import { Card } from "../../cards"; import { ChatArgs } from "../_types"; export const ChatContainer = styled(Card)` - padding: ${({ theme }) => theme.space.md}; + padding: ${({ theme }) => `0 ${theme.space.base * 4}px`}; &:hover { box-shadow: none; } @@ -11,11 +11,11 @@ export const ChatContainer = styled(Card)` `; export const MessagesContainer = styled.div` - padding: ${({ theme }) => theme.space.md}; - margin: ${({ theme }) => `0 -${theme.space.md}`}; + padding: ${({ theme }) => `${theme.space.md} ${theme.space.sm}`}; + margin: ${({ theme }) => `0 -${theme.space.base * 4}px`}; display: flex; flex-direction: column; - gap: ${({ theme }) => theme.space.sm}; + gap: ${({ theme }) => theme.space.xs}; background: ${({ chatBkg }) => chatBkg ?? `#fff`}; overflow-y: auto; `; diff --git a/src/stories/chat/parts/header.tsx b/src/stories/chat/parts/header.tsx index e2c3b780..e424d752 100644 --- a/src/stories/chat/parts/header.tsx +++ b/src/stories/chat/parts/header.tsx @@ -1,12 +1,9 @@ -import { ReactNode } from "react"; -import { MD } from "../../typography/typescale"; import { Title } from "../../title"; import styled from "styled-components"; -import { NavDivider } from "../../navigation/nav/nav-item"; export const ChatTitle = styled(Title)` color: ${({ theme }) => theme.palette.blue[600]}; margin: ${({ theme }) => `0 -${theme.space.md}`}; - padding: ${({ theme }) => `0 ${theme.space.md} ${theme.space.sm}`}; + padding: ${({ theme }) => `${theme.space.sm} ${theme.space.md}`}; border-bottom: ${({ theme }) => `1px solid ${theme.palette.grey[200]}`}; `;