Skip to content

Enable partial cardIcons overrides#916

Open
jmorgadosoares wants to merge 1 commit into
masterfrom
josesoares/exp-993-enable-partial-cardicons-overrides-on-js-and-react-sdks
Open

Enable partial cardIcons overrides#916
jmorgadosoares wants to merge 1 commit into
masterfrom
josesoares/exp-993-enable-partial-cardicons-overrides-on-js-and-react-sdks

Conversation

@jmorgadosoares

Copy link
Copy Markdown
Contributor

Why

Providing a partial cardIcons override (e.g. only overriding visa) caused a TypeScript error because the icons prop was typed as the full CardIcons type, making all card brand keys required.

Fixes [EXP-993](https://linear.app/evervault/issue/EXP-993/enable-partial-cardicons-overrides-on-js-and-react-sdks).

How

Changed the icons prop type to Partial<CardIcons> in the three public-facing locations:

  • CardOptions in packages/types/uiComponents.ts (JS SDK ui.card config)
  • CardComponentOptions in packages/ui-components/src/Card/types.ts
  • CardProps in packages/react/lib/ui/Card.tsx (React SDK)

The collectIcons utility in utilities.ts was also updated to accept Partial<CardIcons> and continues to spread the full ICONS defaults first, so any unspecified brands fall back to their defaults. BrandIcon keeps its icons prop typed as the full CardIcons since it is an internal component that only ever receives the already-merged result of collectIcons.

@jmorgadosoares jmorgadosoares requested a review from a team as a code owner June 22, 2026 14:43
@changeset-bot

changeset-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 567c043

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant