feat: add light theme support#13
Open
jerrydanzaria5-svg wants to merge 1 commit into
Open
Conversation
- Add `theme` prop ("dark" | "light") to TransactionBuilderProps
- Apply `stx-theme-{theme}` class to root wrapper
- Add CSS custom properties for light/dark color values
- Default remains "dark" — no behavior change for existing consumers
- Document new prop in README
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.
Summary
Adds a
themeprop toTransactionBuilderto support a light color scheme, addressing the "Light theme" item on the roadmap.Changes
theme?: "dark" | "light"prop onTransactionBuilderProps(default:"dark")stx-theme-{theme}class--stx-bg,--stx-text,--stx-border,--stx-accent, etc.) for both themes insrc/styles/index.cssWhy this approach
Using a CSS class + custom properties on the root wrapper keeps the change additive and low-risk — no new Context provider, no changes to existing transaction-building logic, and dark mode's current values are unchanged, so nothing breaks for consumers who don't pass the prop.
Usage
```tsx
```
Testing
npm run typecheckpassesnpm run lintpassesthemeprop) renders identically to current dark mode;theme="light"renders with light colors across all stepsNotes
Open to feedback on whether color tokens should also be exposed via
tailwind.config.jsfor consumers who want to customize further — kept this PR scoped to a working light/dark toggle first.