fix: 🐛 remove wrapper and make card always inline
This commit is contained in:
1 parent
005690f838
commit
36375ae0be
4 files changed
+20
-19
No files matched your search
@@ -1,6 +1,4 @@
|
||||
<div class="radio-field-wrapper {{if @inline "inline"}}">
|
||||
{{yield (hash
|
||||
radio=(component 'rose/form/radio/radio' name=@name selectedValue=@selectedValue disabled=@disabled changed=@changed inline=@inline)
|
||||
card=(component 'rose/form/radio/card' name=@name selectedValue=@selectedValue disabled=@disabled changed=@changed inline=@inline layout=@layout)
|
||||
card=(component 'rose/form/radio/card' name=@name selectedValue=@selectedValue disabled=@disabled changed=@changed layout=@layout)
|
||||
)}}
|
||||
</div>
|
||||
@@ -119,7 +119,6 @@ Renders a form radiofield group.
|
||||
@name={{name}}
|
||||
@selectedValue={{selectedValue}}
|
||||
@changed={{changed}}
|
||||
@inline={{inline}}
|
||||
as |radioGroup|
|
||||
>
|
||||
<radioGroup.card
|
||||
@@ -131,11 +130,13 @@ Renders a form radiofield group.
|
||||
<radioGroup.card
|
||||
@label={{secondFieldLabel}}
|
||||
@value={{secondFieldValue}}
|
||||
@icon={{secondFieldIcon}}
|
||||
@layout="tile"
|
||||
/>
|
||||
<radioGroup.card
|
||||
@label={{thirdFieldLabel}}
|
||||
@value={{thirdFieldValue}}
|
||||
@icon={{thirdFieldIcon}}
|
||||
@layout="tile"
|
||||
/>
|
||||
</Rose::Form::Radio::Group>
|
||||
@@ -143,7 +144,6 @@ Renders a form radiofield group.
|
||||
context: {
|
||||
name: text('name', 'mustagree'),
|
||||
disabled: boolean('disabled', false),
|
||||
inline: boolean('inline', true),
|
||||
selectedValue: text('selectedValue', 'disagree'),
|
||||
firstFieldLabel: text('first label', 'Agree'),
|
||||
firstFieldValue: text('first value', 'agree'),
|
||||
@@ -154,6 +154,22 @@ Renders a form radiofield group.
|
||||
'flight-icons/svg/azure-color-16': 'flight-icons/svg/azure-color-16',
|
||||
},
|
||||
null
|
||||
),
|
||||
secondFieldIcon: select(
|
||||
'secondFieldIcon',
|
||||
{
|
||||
'none': null,
|
||||
'flight-icons/svg/azure-color-16': 'flight-icons/svg/azure-color-16',
|
||||
},
|
||||
null
|
||||
),
|
||||
thirdFieldIcon: select(
|
||||
'thirdFieldIcon',
|
||||
{
|
||||
'none': null,
|
||||
'flight-icons/svg/azure-color-16': 'flight-icons/svg/azure-color-16',
|
||||
},
|
||||
null
|
||||
),
|
||||
secondFieldLabel: text('second label', 'Maybe'),
|
||||
secondFieldValue: text('second value', 'maybe'),
|
||||
@@ -193,7 +209,6 @@ Renders a form radiofield group.
|
||||
@name={{name}}
|
||||
@selectedValue={{selectedValue}}
|
||||
@changed={{changed}}
|
||||
@inline={{inline}}
|
||||
as |radioGroup|
|
||||
>
|
||||
<radioGroup.card
|
||||
@@ -217,7 +232,6 @@ Renders a form radiofield group.
|
||||
context: {
|
||||
name: text('name', 'mustagree'),
|
||||
disabled: boolean('disabled', false),
|
||||
inline: boolean('inline', true),
|
||||
selectedValue: text('selectedValue', 'disagree'),
|
||||
firstFieldLabel: text('first label', 'Agree'),
|
||||
firstFieldValue: text('first value', 'agree'),
|
||||
|
||||
@@ -58,7 +58,7 @@ $radio-svg: (
|
||||
}
|
||||
}
|
||||
position: relative;
|
||||
display: flex;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
|
||||
@@ -22,17 +22,6 @@ $radio-svg: (
|
||||
);
|
||||
|
||||
$data-svg-prefix: 'data:image/svg+xml;utf-8,';
|
||||
.radio-field-wrapper {
|
||||
&.inline {
|
||||
display: inline-flex;
|
||||
.rose-form-radio-label {
|
||||
margin-right: sizing.rems(s);
|
||||
}
|
||||
}
|
||||
.rose-form-radio-card {
|
||||
margin-bottom: sizing.rems(s);
|
||||
}
|
||||
}
|
||||
.rose-form-radio {
|
||||
&.inline {
|
||||
display: inline-block;
|
||||
|
||||
Reference in new issue
Block a user