Decathlon / vitamin-web

Decathlon Design System UI components for web applications
https://decathlon.github.io/vitamin-web
Apache License 2.0
279 stars 77 forks source link

feat(@vtmn/react, @vtmn/vue): manage height parameter of `VtmnSkeleton` component #1408

Closed thollander closed 1 year ago

thollander commented 1 year ago

Changes description

unit has non-sense to be managed inside this component, we should instead rely on CSS API instead of managing all possible unit values inside our components. If the value is not correct, CSS will manage it its way.

from <VtmnSkeleton width="100" /> to <VtmnSkeleton width="100%" /> or <VtmnSkeleton width="100px" />

Also add a height parameter which follows this same logic too. <VtmnSkeleton width="100%" height="2em" />

Context

Closes https://github.com/Decathlon/vitamin-web/issues/1403

Checklist

Does this introduce a breaking change?

Other information

Linked to https://github.com/Decathlon/vitamin-web/pull/1404 (svelte impl)

BREAKING CHANGE: remove unit from VtmnSkeleton, it should now be passed in the width or height directly