Skip to content

feat(Timeline): cascade color to indicator Avatar#31

Open
IgorShevchik wants to merge 1 commit into
mainfrom
feat/timeline-avatar-color
Open

feat(Timeline): cascade color to indicator Avatar#31
IgorShevchik wants to merge 1 commit into
mainfrom
feat/timeline-avatar-color

Conversation

@IgorShevchik
Copy link
Copy Markdown
Collaborator

Summary

  • The existing top-level color prop on B24Timeline now also tints the indicator B24Avatar of every item.
  • Explicit item.avatar.color still wins, since v-bind="item.avatar" is applied after :color="props.color".
  • Timeline.variants.color is a strict subset of AvatarProps['color'] (only air-primary*), so the binding casts to the Avatar color type at the template site. No API change, no theme change.
  • Existing renders with air-primary color correctly snapshot is updated: the indicator span now renders style-filled instead of style-outline-no-accent.
  • New renders with color and avatar correctly snapshot witnesses the cascade with avatar items.

Follow-up to #24 (Avatar/AvatarGroup color), #27 (User), #28 (ChatMessage), #29 (Alert), #30 (Toast).

Test plan

  • pnpm run lint passes
  • pnpm run typecheck passes
  • pnpm run test passes — Timeline snapshots witness the cascade
  • Open docs page → Timeline → Color section, verify indicators tint
  • Verify explicit item.avatar.color overrides the cascade

🤖 Generated with Claude Code

The existing top-level `color` prop now also tints the indicator
`B24Avatar` of every item. An explicit `item.avatar.color` still wins,
since `v-bind="item.avatar"` is applied after `:color="props.color"`.
`Timeline.variants.color` is a strict subset of `AvatarProps['color']`
(only `air-primary*`), so the binding casts to the Avatar color type at
the template site. Existing `with air-primary color` snapshot is
updated to reflect the new indicator style.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@IgorShevchik IgorShevchik force-pushed the feat/timeline-avatar-color branch from d8679cd to d556d22 Compare May 13, 2026 07:06
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