Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Img refactor #156

Merged
merged 2 commits into from
Nov 30, 2023
Merged

Img refactor #156

merged 2 commits into from
Nov 30, 2023

Conversation

benjag
Copy link
Contributor

@benjag benjag commented Nov 29, 2023

Refactors image to use CSS image properties

Breaking changes:

  • Removes media container technique (underlying HTML structure)
  • Removes containerClass prop
  • Removes cover prop
  • Removes modifier prop
  • Removes crop prop
  • Changes how radius prop works
  • Changes how ratio prop works

Removes multiple props, the media container pattern, and simplifies markup

BREAKING CHANGE: API has drastically changed as well as underlying markup of the component

/** Media for capturing attention and communicating messages */
defineOptions({
name: 'CdrImg',
inheritAttrs: false,
Copy link
Contributor Author

@benjag benjag Nov 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer necessary

['soft', CdrRadiusSoft],
['softer', CdrRadiusSofter],
['round', CdrRadiusRound]
]);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This map allows for a shorthand mapping of CdrToken values. The following computed property allows the component to accept the token or a custom radius.

@benjag benjag merged commit f51a430 into release/v15 Nov 30, 2023
@benjag benjag deleted the img-refactor branch November 30, 2023 00:05
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.

None yet

1 participant