Skip to content

Commit 227505d

Browse files
authored
feat(app): add QuestionItem dark mode (#400)
* feat(app): add QuestionItem dark mode * refactor(app): change levels background color * refactor(app): change vote button background color
1 parent fca0cc1 commit 227505d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

apps/app/src/components/QuestionItem/QuestionItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type QuestionItemProps = Readonly<{
1313
}>;
1414

1515
export const QuestionItem = ({ title, votes, voted, level, creationDate }: QuestionItemProps) => (
16-
<article className="flex h-36 bg-white p-5 text-sm text-gray-500 shadow-md">
16+
<article className="flex h-36 bg-white p-5 text-sm text-neutral-500 shadow-md dark:bg-white-dark dark:text-neutral-200">
1717
<QuestionVoting votes={votes} voted={voted} />
1818
<h3 className="grow">{title}</h3>
1919
<div className="ml-4 flex min-w-max flex-col items-end">

apps/app/src/components/QuestionItem/QuestionLevel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { twMerge } from "tailwind-merge";
22

33
const levelStyles = {
4-
junior: "bg-[#499dff]",
5-
mid: "bg-[#27be31]",
6-
senior: "bg-[#ffb90b]",
4+
junior: "bg-junior-main",
5+
mid: "bg-mid-main",
6+
senior: "bg-senior-main",
77
};
88

99
export type Level = keyof typeof levelStyles;

apps/app/src/components/QuestionItem/QuestionVoting.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export const QuestionVoting = ({ votes, voted }: QuestionVotingProps) => {
1212
return (
1313
<button
1414
className={twMerge(
15-
"mr-4 flex h-fit items-center gap-x-1.5 text-gray-300 transition-colors",
16-
voted && "text-primary",
15+
"mr-4 flex h-fit items-center gap-x-1.5 text-neutral-200 transition-colors",
16+
voted && "text-violet-700 dark:text-violet-300",
1717
)}
1818
type="button"
1919
aria-label={`To pytanie ma ${votes} ${votesPluralize(votes)}. Kliknij, aby ${

0 commit comments

Comments
 (0)