diff --git a/src/assets/style/common.less b/src/assets/style/common.less index de66469..b1049f4 100644 --- a/src/assets/style/common.less +++ b/src/assets/style/common.less @@ -67,15 +67,19 @@ --text-color: #dfe2eb; --text-color-gray: #a7acbb; } + [data-size="small"] { --font-size-base: 12px; } + [data-size="middle"] { --font-size-base: 13px; } + [data-size="default"] { --font-size-base: 14px; } + [data-size="large"] { --font-size-base: 16px; } @@ -83,11 +87,10 @@ html { background-color: var(--background-color-gray); } + * { vertical-align: baseline; - font-weight: inherit; - font-family: inherit; - font-style: inherit; + font-size: 100%; outline: 0; padding: 0; @@ -102,35 +105,43 @@ textarea { color: var(--text-color); display: block; width: 100%; + &::placeholder { color: var(--text-color-gray); } } + body { font-family: sans-serif; color: var(--text-color); } + .flex { display: flex; + &-c { display: flex; align-items: center; + &-c { display: flex; align-items: center; justify-content: center; } + &-sb { display: flex; align-items: center; justify-content: space-between; } } + &-column { display: flex; flex-direction: column; } + &-1 { flex: 1; } -} +} \ No newline at end of file diff --git a/src/chat/MessageRender.jsx b/src/chat/MessageRender.jsx index 4b3dbe7..a6e9333 100644 --- a/src/chat/MessageRender.jsx +++ b/src/chat/MessageRender.jsx @@ -1,5 +1,5 @@ import React, { memo } from 'react' -import ReactMarkdown from 'react-markdown' +import Markdown from 'react-markdown' import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter' import { oneLight, oneDark } from 'react-syntax-highlighter/dist/esm/styles/prism' import { useGlobal } from './context' @@ -14,7 +14,7 @@ export const MessageRender = memo((props) => { const { options } = useGlobal() const style = options.general.theme === 'dark' ? oneDark : oneLight return ( -