Skip to content

Commit

Permalink
📱 style: error 兼容移动端样式
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Nov 17, 2023
1 parent f7daff6 commit 8081667
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ChatItem/components/ErrorContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ const ErrorContent = memo<ErrorContentProps>(({ message, error, placement }) =>
const { styles } = useStyles({ placement });

return (
<Flexbox gap={8}>
<Alert className={styles.alert} showIcon type={'error'} {...error} />
<Flexbox className={styles.errorContent} gap={8}>
<Alert showIcon type={'error'} {...error} />
{message}
</Flexbox>
);
Expand Down
11 changes: 10 additions & 1 deletion src/ChatItem/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export const useStyles = createStyles(
opacity: 0 !important;
`,
),
alert: css``,
avatarContainer: css`
position: relative;
flex: none;
Expand Down Expand Up @@ -134,6 +133,11 @@ export const useStyles = createStyles(
editingInput: css`
width: 100%;
`,
errorContent: css`
${responsive.mobile} {
width: 100%;
}
`,
loading: css`
position: absolute;
right: ${placement === 'left' ? '-4px' : 'unset'};
Expand All @@ -158,6 +162,10 @@ export const useStyles = createStyles(
editingStylish,
css`
position: relative;
${responsive.mobile} {
max-width: 100%;
}
`,
),
messageContent: cx(
Expand All @@ -168,6 +176,7 @@ export const useStyles = createStyles(
${responsive.mobile} {
flex-direction: column !important;
width: 100%;
}
`,
),
Expand Down

0 comments on commit 8081667

Please sign in to comment.