@datocms/svelte 1.4.2 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -111,8 +111,8 @@ let transition = fadeInDuration > 0 ? `opacity ${fadeInDuration}ms` : void 0;
111
111
  class={klass}
112
112
  style:overflow="hidden"
113
113
  style:position={style.position ?? layout === 'fill' ? 'absolute' : 'relative'}
114
- style:width={style.width ?? layout === 'fixed' ? data.width : '100%'}
115
- style:maxWidth={style.maxWidth ?? layout === 'intrinsic' ? data.width : null}
114
+ style:width={style.width ?? layout === 'fixed' ? `${data.width}px` : '100%'}
115
+ style:max-width={style.maxWidth ?? layout === 'intrinsic' ? `${data.width}px` : null}
116
116
  style:height={style.height ?? layout === 'fill' ? '100%' : null}
117
117
  data-testid="image"
118
118
  >
@@ -161,8 +161,8 @@ let transition = fadeInDuration > 0 ? `opacity ${fadeInDuration}ms` : void 0;
161
161
  style:top="0"
162
162
  style:width="100%"
163
163
  style:height="100%"
164
- style:objectFit
165
- style:objectPosition
164
+ style:object-fit={objectFit}
165
+ style:object-position={objectPosition}
166
166
  data-testid="img"
167
167
  />
168
168
  {/if}
@@ -13,9 +13,9 @@ let opacity = showImage ? 0 : 1;
13
13
  aria-hidden="true"
14
14
  alt=""
15
15
  src={base64}
16
- style:backgroundColor
17
- style:objectFit
18
- style:objectPosition
16
+ style:background-color={backgroundColor}
17
+ style:object-fit={objectFit}
18
+ style:object-position={objectPosition}
19
19
  style:transition
20
20
  style:opacity
21
21
  />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datocms/svelte",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "A set of components and utilities to work faster with DatoCMS in Svelte",
5
5
  "license": "MIT",
6
6
  "repository": {