Skip to content

Commit

Permalink
custom red-white
Browse files Browse the repository at this point in the history
  • Loading branch information
pveyes committed Aug 17, 2023
1 parent 238b402 commit 4291e6d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion components/HeadingWithNum.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,21 @@ interface Props {
}

export default function HeadingWithNum(props: Props) {
const [_, mm, dd] = new Date().toISOString().split("T")[0].split("-");
const isIndonesiaIndependenceDay = mm === "08" && dd === "17";
let customNumClass = "";
if (isIndonesiaIndependenceDay) {
customNumClass = "text-white bg-red-500 p-1";
}

return (
<span>
{props.enableLiarMode ? "Katlie" : "Katla"}
{props.num && (
<sup className="-top-4 tracking-tight" style={{ fontSize: "45%" }}>
<sup
className={`-top-4 tracking-tight ${customNumClass}`}
style={{ fontSize: "45%" }}
>
#{props.num}
</sup>
)}
Expand Down

1 comment on commit 4291e6d

@vercel
Copy link

@vercel vercel bot commented on 4291e6d Aug 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

katla – ./

katla-git-main-katla.vercel.app
katla-katla.vercel.app
katla.vercel.app
katla.id

Please sign in to comment.