Five faces, an optional line, and a thank-you that takes the card's place.
The prompt21,690 characters
Add the "Feedback" component from notboring to my project.
It is licensed for use in my projects — notboring.dev/license. Please:
1. Create the component at a sensible path for this
project, named Feedback, from the source below.
2. It needs nothing beyond React.
3. Add the CSS to the project's stylesheet.
4. THE PART THAT NEEDS YOUR JUDGMENT. The CSS reads
these custom properties and does not define them:
--card
--font-ui
--ink
--ink-2
--ink-3
--ink-5
--ink-rgb
--on-ink
They are notboring's design tokens. Map each one to
whatever this project already uses for the same
job — its own ink, ground, surface and UI font —
rather than defining them as new globals. If the
project has no equivalent, define it locally on
the component's own root so nothing leaks out.
Anything ending -rgb wants three bare numbers,
because the CSS builds rgba() from it.
Keep the comments. They say why the numbers are what
they are, and they are most of what makes this worth
copying rather than rewriting.
--- Feedback.tsx ---
import { useEffect, useLayoutEffect, useRef, useState } from "react";
/* ══ Feedback ═════════════════════════════════════════════
Five faces, an optional line, and a thank-you that takes
the card's place.
ONE FACE, FIVE MOODS. The row is not five icons — it is one
drawing at five settings of a single number: the control
point of the mouth. At −5 the curve bends up into a frown,
at +5 down into a grin, and the three between are the
moods between. Drawn that way the faces agree with each
other in every other respect — same eyes, same circle, same
weight — and the row reads as a scale rather than as a set
of emoji somebody picked.
THE CARD ANSWERS IN THREE SIZES. A question, then the
question with a line to type in, then a thank-you smaller
than either. The card's height is ONE tween on a measured
number, so the textarea is revealed by the card opening
over it rather than by a box growing under a card that has
not noticed, and the thank-you is the card closing down to
what it now has to say. The block reserves the tallest of
the three; the card sits in the middle of that room and
grows both ways. */
The rest — the source and its comments — is what you are buying.