feat: update prettier

This commit is contained in:
crazywoola
2023-06-13 11:04:07 +08:00
parent 77cb0fb2c8
commit 9541bc7982
2 changed files with 14 additions and 4 deletions
+3 -2
View File
@@ -1,12 +1,13 @@
const config = {
semi: false,
tabWidth: 2,
printWidth: 120,
printWidth: 80,
singleQuote: true,
jsxSingleQuote: true,
trailingComma: 'none',
arrowParens: 'always',
endOfLine: 'auto'
endOfLine: 'auto',
noBracketSpacing: true
}
module.exports = config
+11 -2
View File
@@ -10,9 +10,18 @@ interface ChatBubbleProps {
mine?: boolean
}
const ChatBubble: FC<ChatBubbleProps> = ({ opening_statement, content, mine = false }) => {
const ChatBubble: FC<ChatBubbleProps> = ({
opening_statement,
content,
mine = false
}) => {
return (
<div className={cn(styles.bubble, mine ? styles.bubble_mine : styles.bubble_other)}>
<div
className={cn(
styles.bubble,
mine ? styles.bubble_mine : styles.bubble_other
)}
>
{opening_statement && <div>{opening_statement}</div>}
<div>{content}</div>
<div></div>