Skip to content

Add font size toggle on code snippets 🔠 #540

Description

@anoopcodehack

Add font size toggle on code snippets 🔠

File: client/src/components/Board/TaskCard.jsx

Code snippets have fixed tiny font 💀
Hard to read for some people fr!!

Fix:
const [fontSize, setFontSize] = useState(10)

<button onClick={(e) => {
e.stopPropagation()
setFontSize(s => s === 10 ? 13 : 10)
}}
className="text-[10px] text-[#555]
hover:text-purple-400 transition">
{fontSize === 10 ? 'A+' : 'A-'}

<SyntaxHighlighter
customStyle={{ fontSize }}
...

~6 lines! No backend needed 🎯
Super accessible feature!! ♿

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions