[web] interviews/guides: fix playbook ui issues (#984)

This commit is contained in:
Nitesh Seram 2024-11-15 16:32:48 +05:30 committed by GitHub
parent 7469540e43
commit 470abc02eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 17 additions and 8 deletions

View File

@ -43,7 +43,7 @@ export default function GuidesList<Q extends GuideCardMetadata>({
'relative isolate',
'flex flex-grow items-center gap-6',
'rounded-lg',
'px-6 py-5',
'px-6 py-4',
themeBackgroundCardWhiteOnLightColor,
['border', themeBorderElementColor],
)}>
@ -55,8 +55,8 @@ export default function GuidesList<Q extends GuideCardMetadata>({
onMarkAsCompleted={onMarkAsCompleted}
onMarkAsNotCompleted={onMarkAsNotCompleted}
/>
<div className="flex flex-1 flex-col items-start gap-1">
<Text size="body2" weight="bold">
<div className="flex flex-1 flex-col items-start gap-2">
<Text size="body1" weight="bold">
{guide.title}
</Text>
<Text color="secondary" size="body2">

View File

@ -8,6 +8,7 @@ import type {
} from '~/components/guides/types';
import { useIntl } from '~/components/intl';
import Heading from '~/components/ui/Heading';
import { themeTextColor } from '~/components/ui/theme';
import {
useMutationGuideProgressAdd,
@ -137,10 +138,12 @@ export default function GuidesListWithCategory({ guides }: Props) {
return (
<div className={clsx('grid lg:grid-cols-12')}>
<div className={clsx('flex flex-col gap-12', 'lg:col-span-10')}>
<div className={clsx('flex flex-col gap-12', 'lg:col-span-9')}>
{guides.map(({ title, totalReadingTime, articles }, index) => (
<div key={title}>
<Heading level="heading6">{title}</Heading>
<Heading className={themeTextColor} color="custom" level="heading6">
{title}
</Heading>
<div className="mb-4 mt-6 flex items-center gap-10">
<GuidesCountLabel count={articles.length} />
<GuideReadingTimeLabel readingTime={totalReadingTime} />

View File

@ -1,6 +1,12 @@
import { cva } from 'class-variance-authority';
import clsx from 'clsx';
import {
themeTextColor,
themeTextDarkColor,
themeTextLightColor,
} from '~/components/ui/theme';
export type HeadingLevel =
| 'custom'
| 'heading1'
@ -26,10 +32,10 @@ const headingLevelClasses: Record<HeadingLevel, string> = {
};
const headingColorClasses: Record<HeadingColor, string> = {
auto: 'text-neutral-900 dark:text-white',
auto: themeTextColor,
custom: '',
dark: 'text-neutral-900',
light: 'text-white',
dark: themeTextDarkColor,
light: themeTextLightColor,
};
const headingWeightClasses: Record<HeadingWeight, string> = {