@miljodirektoratet/md-css 1.1.2 → 1.1.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.
- package/package.json +1 -1
- package/src/button/README.md +13 -5
- package/src/button/button.css +17 -0
package/package.json
CHANGED
package/src/button/README.md
CHANGED
|
@@ -2,14 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
To use the `Button` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
|
|
4
4
|
|
|
5
|
-
Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
|
|
5
|
+
Class names and elements in brackets [] are optional-/togglable-/decorator- or state dependant classes.
|
|
6
6
|
|
|
7
7
|
See [Storybook](https://miljodir.github.io/md-components) for examples and more info.
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
|
-
<button className="md-button [md-button--small, md-button--secondary, md-button--danger]">
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
<button className="md-button [md-button--small, md-button--secondary, md-button--danger, md-button--column]">
|
|
11
|
+
[
|
|
12
|
+
<div className="md-button__topIcon">{topIcon}</div>
|
|
13
|
+
] [
|
|
14
|
+
<div className="md-button__content">
|
|
15
|
+
]
|
|
16
|
+
<div className="md-button__leftIcon">{leftIcon}</div>
|
|
17
|
+
BUTTON TEXT
|
|
18
|
+
<div className="md-button__rightIcon">{rightIcon}</div>
|
|
19
|
+
[
|
|
20
|
+
</div>
|
|
21
|
+
]
|
|
14
22
|
</button>
|
|
15
23
|
```
|
package/src/button/button.css
CHANGED
|
@@ -11,11 +11,28 @@
|
|
|
11
11
|
border: none;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
.md-button--column {
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: 0.5rem;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.md-button__content {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: row;
|
|
22
|
+
align-items: center;
|
|
23
|
+
}
|
|
24
|
+
|
|
14
25
|
.md-button--small {
|
|
15
26
|
padding: 0.4rem 0.8rem;
|
|
16
27
|
border-radius: 0.43rem;
|
|
17
28
|
}
|
|
18
29
|
|
|
30
|
+
.md-button__topIcon {
|
|
31
|
+
height: 1rem;
|
|
32
|
+
width: 1rem;
|
|
33
|
+
flex-shrink: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
19
36
|
.md-button__leftIcon {
|
|
20
37
|
height: 1rem;
|
|
21
38
|
width: 1rem;
|