mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
refactor(radio): .radio-checked only applied once
This commit is contained in:

committed by
Manu MA

parent
cbf163279b
commit
19e5df941c
@ -47,7 +47,7 @@
|
|||||||
// Material Design Radio Outer Circle: Checked
|
// Material Design Radio Outer Circle: Checked
|
||||||
// -----------------------------------------
|
// -----------------------------------------
|
||||||
|
|
||||||
.radio-md .radio-checked {
|
.radio-md.radio-checked .radio-icon {
|
||||||
border-color: $radio-md-color-on;
|
border-color: $radio-md-color-on;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,7 +130,7 @@
|
|||||||
color: $color-base;
|
color: $color-base;
|
||||||
}
|
}
|
||||||
|
|
||||||
.radio-md-#{$color-name} .radio-checked {
|
.radio-md-#{$color-name}.radio-checked .radio-icon {
|
||||||
border-color: $color-base;
|
border-color: $color-base;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Component, Event, EventEmitter, Prop, State, Watch } from '@stencil/core';
|
import { Component, Event, EventEmitter, Prop, State, Watch } from '@stencil/core';
|
||||||
import { CheckedInputChangeEvent, CssClassMap, Mode, RadioButtonInput, StyleEvent } from '../../interface';
|
import { CheckedInputChangeEvent, Mode, RadioButtonInput, StyleEvent } from '../../interface';
|
||||||
import { deferEvent } from '../../utils/helpers';
|
import { deferEvent } from '../../utils/helpers';
|
||||||
import { createThemedClasses } from '../../utils/theme';
|
import { createThemedClasses } from '../../utils/theme';
|
||||||
|
|
||||||
@ -182,12 +182,8 @@ export class Radio implements RadioButtonInput {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const radioClasses: CssClassMap = {
|
|
||||||
'radio-icon': true,
|
|
||||||
'radio-checked': this.checked
|
|
||||||
};
|
|
||||||
return [
|
return [
|
||||||
<div class={radioClasses}>
|
<div class="radio-icon">
|
||||||
<div class="radio-inner"/>
|
<div class="radio-inner"/>
|
||||||
</div>,
|
</div>,
|
||||||
<input
|
<input
|
||||||
|
Reference in New Issue
Block a user