feat(User): add color prop forwarded to inner Avatar#27
Open
IgorShevchik wants to merge 3 commits into
Open
Conversation
This was referenced May 11, 2026
564b149 to
fc8eeda
Compare
2 tasks
Tints the inner `B24Avatar` by default. An explicit `avatar.color` still wins, since `v-bind="props.avatar"` is applied after `:color="props.color"`. No theme change in `user.ts` — the prop is a pure passthrough. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The User `color` prop is typed as `AvatarProps['color']`, which the docs generator cannot auto-resolve into the palette list (resolution looks at the host theme's own `variants.color`, which User does not declare). Spell the palette out via `items.color` in the Color section so the playground renders the full color selector. Mirrors the same fix on `Error` (`275c8b0b docs(Error): update color list`). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Picks up upstream snapshot drift from `c00d2c42 test: update snapshots`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fc8eeda to
0bd38b4
Compare
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
color?: AvatarProps['color']prop onB24User.colorto the innerB24Avatar(in both render branches — wrapped inB24Chipand standalone).avatar.colorstill wins, sincev-bind="props.avatar"is applied after:color="props.color". No theme change insrc/theme/user.ts— the prop is a pure passthrough.Follow-up to #24 (Avatar/AvatarGroup
colorprop) to cascade the color intoUser, mirroring the pattern from #23 (Breadcrumb) and #25 (PageCard/PageCardGroup).Test plan
pnpm run lintpassespnpm run typecheckpasses (root + docs + both playgrounds)pnpm run testpasses — newrenders with color correctlysnapshot witnesses the cascade (style-filledforair-primaryvs defaultstyle-outline-no-accent)playgrounds/nuxtandplaygrounds/demo→userpage, toggle the Color selector, verify the avatar visibly tintsavatar.coloroverrides the cascade (set:avatar="{ src: '...', color: 'air-primary-success' }"whilecolor="air-primary-alert"onB24User— avatar should be success)🤖 Generated with Claude Code