File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed
packages/components/src/components/card Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,29 @@ Please provide the correct `type` property in your code anyhow as a best practis
16
16
We removed the ` state ` property from the ` db-button ` /` DBButton ` component for now.
17
17
It wasn't implemented in any framework causing some confusion, and we will reintroduce it in a future version.
18
18
19
+ ## db-card/DBCard
20
+
21
+ ### ` behavior='interactive' ` change
22
+
23
+ We changed the ` behavior='interactive' ` property not applying ` role='button' ` and ` tabIndex ` anymore.
24
+ If you want to use an interactive card, you should wrap the card with the correct HTML element, like a ` button ` or ` a ` tag:
25
+
26
+ ``` html
27
+ <!-- Angular-->
28
+ <button >
29
+ <db-card behavior =" interactive" >
30
+ <!-- card content -->
31
+ </db-card >
32
+ </button >
33
+
34
+ <!-- React/Vue-->
35
+ <button >
36
+ <DBCard behavior =" interactive" >
37
+ <!-- card content -->
38
+ </DBCard >
39
+ </button >
40
+ ```
41
+
19
42
## icon-before/-after
20
43
21
44
We renamed the ` data-icon-after ` and ` data-icon-before ` properties to ` data-icon-trailing ` and ` data-icon-leading ` ,
Original file line number Diff line number Diff line change @@ -33,8 +33,6 @@ export default function DBCard(props: DBCardProps) {
33
33
data-behavior = { props . behavior }
34
34
data-elevation-level = { props . elevationLevel }
35
35
data-spacing = { props . spacing }
36
- role = { props . behavior === 'interactive' ? 'button' : undefined }
37
- tabIndex = { props . behavior === 'interactive' ? 0 : undefined }
38
36
onClick = { ( event : ClickEvent < HTMLElement > ) =>
39
37
state . handleClick ( event )
40
38
} >
You can’t perform that action at this time.
0 commit comments