Skip to content

feat: add Relay themes and a theme provider - #2

Merged
autoantohaki merged 2 commits into
mainfrom
feat/theme
Oct 22, 2026
Merged

autoantohaki merged 2 commits into
mainfrom
feat/theme

Conversation

@autoantohaki

Copy link
Copy Markdown
Member

Requested by mau

Before: relay-cards (theme), relay-chat (ChatTheme) and relay-shell (ShellTheme) each defined the Relay palette, with slightly different values for green, red and yellow and different names for the same roles.

After: relay-ui exports one Theme with named roles (accent, focus, success, warning, danger, muted, rule, surfaces), relayTheme and monoTheme, defineTheme to override a few colors, resolveTheme for --theme flags, and ThemeProvider/useTheme so components pick up the theme without a prop. relay-ui --theme mono shows the gallery in either theme.

Where the three repos disagreed, the values follow relay-chat and relay-shell (danger #FF4D5A, warning #F0C84B) and relay-shell's green #4FD18B. relay-cards will see slightly different shades when it migrates.

How: src/theme/ holds the palette, the provider and a Swatches list used by the gallery. Stacked on #1; the diff shrinks to this commit once #1 is merged.

@autoantohaki
autoantohaki merged commit e8d4f78 into main Oct 22, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant