MCPcopy Index your code
hub / github.com/dmarman/sha256algorithm / ButtonClock

Function ButtonClock

src/components/ButtonClock.js:1–6  ·  view source on GitHub ↗
({ clock, onClock, lastClock })

Source from the content-addressed store, hash-verified

1function ButtonClock({ clock, onClock, lastClock }) {
2 let bg = 'hover:bg-red-600';
3 if(clock === lastClock()) bg = 'opacity-25 cursor-default';
4
5 return (
6 <button onClick={onClock} className={`px-3 py-2 rounded ${bg} bg-red-700 text-white mx-1 transition`} title="One step">
7 <div className="flex items-center justify-between w-11">
8 <svg width="18" height="16" viewBox="0 0 18 16" fill="none" xmlns="http://www.w3.org/2000/svg">
9 <path d="M8 2.66667V13.3333L16.6667 8.00001L8 2.66667Z" stroke="white" strokeWidth="1.33333" strokeLinecap="round" strokeLinejoin="round"/>

Callers

nothing calls this directly

Calls 1

lastClockFunction · 0.85

Tested by

no test coverage detected