Repository navigation
feat(scraps): Publish Heading in the shadcn registry - #133337
Draft
sentry-junior[bot] wants to merge 1 commit into
Draft
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
Add a scraps/heading registry:ui item that re-exports Heading from @sentry/scraps/text to components/ui/scraps/heading.tsx, and document it in the package README. Closes DE-1985
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
scraps/headingitem to the Scraps shadcn registry.It installs
components/ui/scraps/heading.tsx, which re-exportsHeadingandHeadingPropsfrom@sentry/scraps/text, plus@sentry/scraps@>=0.8.0and@emotion/react. The target sits underui/scraps/like the Button item, so it can't collide with shadcn's own files.Why not stock shadcn: shadcn/ui has no heading component, only copy-paste Tailwind classes on its Typography page. Scraps
Headingrequires a semantic level (as="h1"–"h6"), gives each level a default Scraps size, and letssizechange the look without changing the level. It also brings Scraps weights, colors (variant), responsive sizes, and ellipsis handling.Setup: add the
scrapstheme first, and render underScrapsProvideror thescraps/theme-providerThemeProvider. The README gets a new## shadcn/ui componentssection with a### Headingsubsection: the install command and a short heading-levels example.Heading's Emotion styles (margin reset, color, font) aren't in a cascade layer, so they beat Tailwind utilities passed in
className. For example,className="mt-8 text-red-500"has no effect. The README says to space headings from the parent and to usevariantfor color. The same applies to the Button item.Closes DE-1985
via @natemoo-re.
--
View Session [Sentry]