Skip to content

Instantly share code, notes, and snippets.

View data-miner00's full-sized avatar
🌴
On a sabbatical

Shaun Chong data-miner00

🌴
On a sabbatical
View GitHub Profile
@data-miner00
data-miner00 / README.md
Created January 30, 2024 05:49
leftpad

Leftpad

To install, run

npm i gist:<the hash on url>
@data-miner00
data-miner00 / _app.tsx
Created February 3, 2023 00:27
Collapsible View
import React, { useState } from "react"
function App() {
const [expanded, setExpanded] = useState(false)
return (
<div onClick={() => setExpanded(prev => !prev)}>
<h1>This is a title</h1>
{expanded && (
<div className="collapsible-content">
<p>This is a collapsible paragraph</p>