File tree Expand file tree Collapse file tree 4 files changed +20
-11
lines changed Expand file tree Collapse file tree 4 files changed +20
-11
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ export const SelectableMixin = <T extends Constructor<LitElement>>(
45
45
// If not selectable target, then make it self selectable. (A selectable target should be made focusable by the component itself)
46
46
this . setAttribute ( 'tabindex' , `${ newVal ? '0' : '-1' } ` ) ;
47
47
}
48
- this . requestUpdate ( 'selected ' , oldVal ) ;
48
+ this . requestUpdate ( 'selectable ' , oldVal ) ;
49
49
}
50
50
51
51
protected deselectable = true ;
Original file line number Diff line number Diff line change @@ -3,15 +3,16 @@ import {
3
3
SelectOnlyMixin ,
4
4
} from '@umbraco-ui/uui-base/lib/mixins' ;
5
5
import { defineElement } from '@umbraco-ui/uui-base/lib/registration' ;
6
- import { css , LitElement } from 'lit' ;
6
+ import { css , html , LitElement } from 'lit' ;
7
7
import { property } from 'lit/decorators.js' ;
8
8
9
9
import { UUICardEvent } from './UUICardEvent' ;
10
10
11
11
/**
12
12
* @element uui-card
13
- * @fires {UUICardEvent } open - fires when the card title is clicked
14
- * @description - Base card component to be extended by specific cards.
13
+ * @fires {UUICardEvent } open - fires when the card title is clicked.
14
+ * @description - Base card component to be extended by specific card elements.
15
+ * @slot - Default content.
15
16
*/
16
17
@defineElement ( 'uui-card' )
17
18
export class UUICardElement extends SelectOnlyMixin (
@@ -158,6 +159,10 @@ export class UUICardElement extends SelectOnlyMixin(
158
159
e . stopPropagation ( ) ;
159
160
this . dispatchEvent ( new UUICardEvent ( UUICardEvent . OPEN ) ) ;
160
161
}
162
+
163
+ protected render ( ) {
164
+ return html `< slot > </ slot > ` ;
165
+ }
161
166
}
162
167
163
168
declare global {
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ const Template: Story = () => html`
18
18
Card is a Component that provides the basics for a Card component. This can
19
19
be extended in code to match a certain need.
20
20
</ p >
21
+
22
+ < uui-card selectable >
23
+ < h5 class ="uui-h5 "> Context of the card< h5 >
24
+ </ uui-card >
21
25
` ;
22
26
23
27
export const AAAOverview = Template . bind ( { } ) ;
Original file line number Diff line number Diff line change @@ -188,9 +188,9 @@ export const Dialog = () => html`
188
188
assume the message, for those users we want something that is easy to
189
189
digest for their eyes.< br />
190
190
Others are learning the system and need to be suited to all of the
191
- consequences to have confidence in what they do. They will read everything
192
- but not necessarily understand all words — Therefore we will use the
193
- description to write sentences and confirm the understanding.
191
+ consequences to have confidence in what they do. They will read
192
+ everything but not necessarily understand all words — Therefore we will
193
+ use the description to write sentences and confirm the understanding.
194
194
</ p >
195
195
196
196
< p >
@@ -257,8 +257,8 @@ export const Dialog = () => html`
257
257
258
258
< br />
259
259
< p >
260
- In the above example the description helps the user understand the effect —
261
- and guides the user by mentioning where it goes.
260
+ In the above example the description helps the user understand the effect
261
+ — and guides the user by mentioning where it goes.
262
262
</ p >
263
263
< br />
264
264
@@ -276,8 +276,8 @@ export const Dialog = () => html`
276
276
< br />
277
277
< p >
278
278
This helps the user understand the effect of publishing and ´descendants´
279
- — which for someone who does not have experience can be hard to
280
- understand at first.
279
+ — which for someone who does not have experience can be hard to understand
280
+ at first.
281
281
</ p >
282
282
283
283
< br />
You can’t perform that action at this time.
0 commit comments