Skip to content

Commit d3d91b3

Browse files
committed
docs(v10): adds examples for updating imports to assets and fonts
1 parent b63b7cd commit d3d91b3

File tree

1 file changed

+42
-9
lines changed
  • packages/dnb-design-system-portal/src/docs/uilib/about-the-lib/releases/eufemia

1 file changed

+42
-9
lines changed

packages/dnb-design-system-portal/src/docs/uilib/about-the-lib/releases/eufemia/v10-info.mdx

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ yarn add @dnb/eufemia@10
6969

7070
1. Updated multiple types from `string | boolean` to `boolean`, as there was a lot of properties who should only support boolean values and not strings.
7171
Examples of changes to do would be to find Eufemia components using `"false"` or `"true"`, and replace it with boolean values. i.e., `vertical="false"` to `vertical={false}` or `selectall="true"` to `selectall={true}`.
72-
Following is a non exhaustive list of affected properties:
72+
Following is a non-exhaustive list of affected properties:
7373
- `vertical`
7474
- `prevent_selection`
7575
- `show_label`
@@ -178,17 +178,37 @@ do not contain the properties anymore. Properties are only a part of a theme fil
178178

179179
As long as you don't import them in your application, you don't need to make any changes in your codebase.
180180

181-
If you have done the following:
181+
Following is a non-exhaustive list of examples of changes that could be relevant for your application:
182182

183-
```js
184-
import properties from '@dnb/eufemia/style/properties'
185-
```
183+
1. Find references to `@dnb/eufemia/style/properties` and replace it with `@dnb/eufemia/style/themes/theme-ui/properties`.
186184

187-
Change to:
185+
From:
188186

189-
```js
190-
import properties from '@dnb/eufemia/style/themes/theme-ui/properties'
191-
```
187+
```js
188+
import properties from '@dnb/eufemia/style/properties'
189+
```
190+
191+
To:
192+
193+
```js
194+
import properties from '@dnb/eufemia/style/themes/theme-ui/properties'
195+
```
196+
197+
1. Find references to `@dnb/eufemia/cjs/style/properties` and replace it with `@dnb/eufemia/cjs/style/themes/theme-ui/properties`.
198+
199+
From:
200+
201+
```js
202+
import properties from '@dnb/eufemia/style/properties'
203+
```
204+
205+
To:
206+
207+
```js
208+
import properties from '@dnb/eufemia/cjs/style/themes/theme-ui/properties'
209+
```
210+
211+
1. Find references to `@dnb/eufemia/style/dnb-ui-properties.min.css` and replace it with `@dnb/eufemia/style/themes/theme-ui/ui-theme-properties.min.css`.
192212

193213
## Removal of `data-testid` in components
194214

@@ -222,6 +242,19 @@ do not contain the fonts anymore. Fonts are now only a part of a theme file, suc
222242

223243
As long as you don't import them manually, you don't need to make any changes in your codebase.
224244

245+
Find references to `@dnb/eufemia/assets/fonts/` and replace it with `@dnb/eufemia/assets/fonts/dnb/`.
246+
For instance, changing from:
247+
248+
```js
249+
import exampleFont from '@dnb/eufemia/assets/fonts/exampleFont.woff2'
250+
```
251+
252+
To:
253+
254+
```js
255+
import exampleFont from '@dnb/eufemia/assets/fonts/dnb/exampleFont.woff2'
256+
```
257+
225258
## SVG assets
226259

227260
All `svg` icon files were moved inside a subfolder in `/assets/icons/dnb/...`.

0 commit comments

Comments
 (0)