@scania/tegel-react 1.2.0 → 1.3.0
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.
- package/README.md +12 -11
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
[](https://tegel-storybook.netlify.app/)
|
|
2
2
|

|
|
3
3
|

|
|
4
|
-

|
|
5
5
|
|
|
6
6
|
# @scania/tegel-react
|
|
7
|
-
This is
|
|
7
|
+
This is an ongoing project with the purpose to simplify the integration of Tegel in React apps.
|
|
8
8
|
|
|
9
9
|
This guide [here](https://stenciljs.com/docs/react) has served as base for the configuration.
|
|
10
10
|
|
|
11
11
|
Official website: https://tegel.scania.com/
|
|
12
12
|
|
|
13
|
-
Storybook: https://
|
|
13
|
+
Storybook: https://tds-storybook.tegel.scania.com/
|
|
14
14
|
|
|
15
15
|
The design system supports the design and development of digital solutions at Scania. The purpose is to secure a coherent, premium brand and user experience across all of Scania's digital touchpoints.
|
|
16
16
|
|
|
@@ -25,22 +25,23 @@ This package is currently in a **beta** stage. We are now working hard towards a
|
|
|
25
25
|
2. In your App.tsx:
|
|
26
26
|
|
|
27
27
|
```ts
|
|
28
|
-
import {
|
|
28
|
+
import { defineCustomElements, TdsButton } '@scania/tegel-react';
|
|
29
29
|
|
|
30
|
-
defineCustomElements();
|
|
30
|
+
defineCustomElements(); // Needs to be run in the browser once, before any elements are used.
|
|
31
31
|
|
|
32
32
|
function App() {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
return (
|
|
34
|
+
<div className="App">
|
|
35
|
+
<TdsButton text="Click me!">
|
|
36
|
+
</TdsButton>
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
export default App;
|
|
41
42
|
```
|
|
42
43
|
|
|
43
|
-
|
|
44
|
+
1. In your global css file import the tegel stylesheet.
|
|
44
45
|
|
|
45
46
|
```css
|
|
46
47
|
@import url('@scania/tegel/dist/tegel/tegel.css');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scania/tegel-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "React wrappers for Tegel package",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/scania-digital-design-system/tegel#readme",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@scania/tegel": "1.
|
|
30
|
+
"@scania/tegel": "1.3.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "^20.8.0",
|