File tree Expand file tree Collapse file tree 3 files changed +22
-11
lines changed Expand file tree Collapse file tree 3 files changed +22
-11
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ const SPACE = ' ';
15
15
16
16
/**
17
17
* @element uui-radio-group
18
- * @slot for uui-radio elements
18
+ * @slot default - slot for `< uui-radio>` elements or custom elements that extend from `UUIRadioElement`
19
19
*/
20
20
@defineElement ( 'uui-radio-group' )
21
21
export class UUIRadioGroupElement extends FormControlMixin ( LitElement ) {
Original file line number Diff line number Diff line change 1
- import { html , css , LitElement } from 'lit' ;
2
- import { defineElement } from '@umbraco-ui/uui-base/lib/registration' ;
3
- import { query , property } from 'lit/decorators.js' ;
4
1
import {
5
- UUIHorizontalShakeKeyframes ,
6
2
UUIHorizontalShakeAnimationValue ,
3
+ UUIHorizontalShakeKeyframes ,
7
4
} from '@umbraco-ui/uui-base/lib/animations' ;
5
+ import { defineElement } from '@umbraco-ui/uui-base/lib/registration' ;
6
+ import { css , html , LitElement } from 'lit' ;
7
+ import { property , query } from 'lit/decorators.js' ;
8
+
8
9
import { UUIRadioEvent } from './UUIRadioEvent' ;
9
10
10
11
/**
11
12
* @element uui-radio
12
13
* @description - a single radio, should never be use as a stand-alone. Must be wrapped in `<uui-radio-group></uui-radio-group>` element.
13
- * @slot - for label
14
- * @cssprop --uui-radio-button-size - Sets the size of the radio button.
15
- * @fires change - on input change
16
- *
14
+ * @slot default - slot to set the label if no `label` attribute is set.
15
+ * @cssprop --uui-radio-button-size - Sets the size of the radio button.
16
+ * @fires change - on input change
17
17
*/
18
18
@defineElement ( 'uui-radio' )
19
19
export class UUIRadioElement extends LitElement {
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ export default {
12
12
checked : false ,
13
13
disabled : false ,
14
14
} ,
15
+ argTypes : {
16
+ default : { control : { type : 'text' } } ,
17
+ } ,
15
18
} ;
16
19
17
20
export const AAAOverview : Story = props =>
@@ -21,13 +24,21 @@ export const AAAOverview: Story = props =>
21
24
.name=${ props . name }
22
25
?disabled=${ props . disabled }
23
26
?checked=${ props . checked }
24
- > Label </ uui-radio
27
+ > ${ props . default } </ uui-radio
25
28
> ` ;
26
29
AAAOverview . storyName = 'Overview' ;
27
30
AAAOverview . parameters = {
28
31
docs : {
29
32
source : {
30
- code : `Copy from GroupedOverview story` ,
33
+ code : `<uui-radio-group name="Test">
34
+ <uui-radio value="Value 1" disabled>Option 1</uui-radio>
35
+ <uui-radio value="Value 2" label="Option 2"></uui-radio>
36
+ <uui-radio value="Value 3">Option 3</uui-radio>
37
+ <uui-radio value="Value 4" disabled>Option 4</uui-radio>
38
+ <uui-radio value="Value 5" checked>Option 5</uui-radio>
39
+ <uui-radio value="Value 6">Option 6</uui-radio>
40
+ <uui-radio value="Value 7" disabled>Option 7</uui-radio>
41
+ </uui-radio-group>` ,
31
42
} ,
32
43
} ,
33
44
} ;
You can’t perform that action at this time.
0 commit comments