Devvit Blocks | Component button does not show caution appearance type correctly

Open
#165 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
frontend

Research direction

Start with the Devvit Blocks button implementation and trace how the appearance="caution" example from the linked button documentation is compiled to CSS classes. Compare the generated button-secondary class with the existing button-caution CSS. Done means caution buttons render yellow while secondary buttons retain their dark grey appearance.

Written by the indexing model from the issue text.

Description

blocks
Issue

Using the Block component shows up the same as i.e. a dark grey color rather than yellow

Example Devvit Code

<button appearance="caution" onPress={() => someAction('here') }>

however, as per the documentation here: Devvit docs the style should be yellow

Expected Resolution

This appears to happen since the css is compiled to class button-secondary rather than button-caution. Please correct the compilation, since the caution class does appear to be present in the css, maybe the build process incorrectly compiles to secondary instead.

Hoping for a quick resolution. Thanks!

Dominant language
TypeScript
Stars
210
Forks
88
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from reddit/devvit

All issues in reddit/devvit

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.