discourse/app/assets/stylesheets/common/form-kit/_control-radio.scss
Joffrey JAFFEUX 0fbce0aa85
DEV: adds a way to set a title/description to a radio (#28049)
Usage:

```
<Form as |form|>
  <form.Field @name="foo" @title="Foo" as |field|>
    <field.RadioGroup as |RadioGroup|>
      <RadioGroup.Radio @value="one" as |radio|>
        <radio.Title>One title</radio.Title>
        <radio.Description>One description</radio.Description>
      </RadioGroup.Radio>
    </field.RadioGroup>
  </form.Field>
</Form>
```
2024-07-24 14:25:34 +02:00

35 lines
602 B
SCSS

.form-kit__control-radio-label {
display: flex;
gap: 0.5em;
font-weight: normal !important;
margin: 0;
color: var(--primary);
.form-kit__field[data-disabled] & {
cursor: not-allowed;
}
input[type="radio"] {
margin-right: 0; //old input overrule
}
}
.form-kit__control-radio-content {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.form-kit__control-radio-description {
color: var(--primary-medium);
}
.form-kit__inline-radio {
display: flex;
gap: 1.5rem;
align-items: center;
input[type="radio"] {
margin-right: 0; //old input overrule
}
}