Skip to content

Commit

Permalink
💄 style: improve group topic styles (#4610)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx authored Nov 5, 2024
1 parent 10a69ff commit 65e816a
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@ import { GroupedTopic } from '@/types/topic';
const preformat = (id: string) =>
id.startsWith('20') ? (id.includes('-') ? dayjs(id).format('MMMM') : id) : undefined;

const useStyles = createStyles(({ css, token, stylish }) => ({
const useStyles = createStyles(({ css, token, responsive }) => ({
container: css`
color: ${token.colorTextQuaternary};
${stylish.blur}
background: ${token.colorBgLayout};
box-shadow: 0 3px 4px -2px ${token.colorBgLayout};
${responsive.mobile} {
background: ${token.colorBgElevated};
box-shadow: 0 3px 4px -2px ${token.colorBgElevated};
}
`,
}));

Expand All @@ -22,7 +28,7 @@ const TopicGroupItem = memo<Omit<GroupedTopic, 'children'>>(({ id, title }) => {
const timeTitle = preformat(id) ?? t(`groupTitle.byTime.${id}` as any);

return (
<Flexbox className={styles.container} paddingBlock={8} paddingInline={12}>
<Flexbox className={styles.container} paddingBlock={'12px 8px'} paddingInline={12}>
{title ? title : timeTitle}
</Flexbox>
);
Expand Down

0 comments on commit 65e816a

Please sign in to comment.