open-vault/ui/app/styles/components/box-radio.scss
Angel Garbarino f120922ab3
Bug Fix: allow click of label and box for box-radio component (#10586)
* make glimmer component and remove extra lable, fix styling

* remove commented out code

* remove extra label for when disabled as well
2020-12-16 09:46:34 -07:00

63 lines
1.3 KiB
SCSS

.box-radio-container {
display: flex;
flex-wrap: wrap;
}
.title.box-radio-header {
font-size: $size-6;
color: $grey;
margin: $size-7 0 0 0;
}
.box-radio-spacing {
margin: $size-6 $size-3 $size-6 0;
}
.box-radio {
box-sizing: border-box;
flex-basis: 7rem;
width: 7rem;
min-height: 7.5rem;
padding: $size-10 $size-6 $size-10;
flex-direction: column;
justify-content: space-between;
align-items: center;
display: flex;
border-radius: $radius;
box-shadow: $box-shadow;
text-align: center;
color: $grey;
font-weight: $font-weight-semibold;
line-height: 1;
margin: $size-6 $size-3 $size-6 0;
font-size: 12px;
transition: box-shadow ease-in-out $speed;
will-change: box-shadow;
&.is-selected {
box-shadow: 0 0 0 1px $grey-light, $box-shadow-middle;
}
&.is-disabled {
opacity: 0.5;
}
input[type='radio'].radio + label {
border: 1px solid $grey-light;
border-radius: 50%;
cursor: pointer;
display: block;
margin: 1rem auto 0;
height: 1rem;
width: 1rem;
flex-shrink: 0;
flex-grow: 0;
}
input[type='radio'].radio:checked + label {
background: $blue;
border: 1px solid $blue;
box-shadow: inset 0 0 0 0.15rem $white;
}
input[type='radio'].radio:focus + label {
box-shadow: 0 0 10px 1px rgba($blue, 0.4), inset 0 0 0 0.15rem $white;
}
}