mirror of https://github.com/rancher/dashboard.git
fix grouping of RadioGroup with meaningful title (#13838)
* fix grouping of RadioGroup with meaninful title * apply fix from Phil
This commit is contained in:
parent
4421b7332f
commit
be068fade4
|
|
@ -199,33 +199,35 @@ export default defineComponent({
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<fieldset>
|
||||
<!-- Label -->
|
||||
<div
|
||||
v-if="label || labelKey || tooltip || tooltipKey || $slots.label"
|
||||
class="radio-group label"
|
||||
>
|
||||
<slot name="label">
|
||||
<h3>
|
||||
<t
|
||||
v-if="labelKey"
|
||||
:k="labelKey"
|
||||
/>
|
||||
<template v-else-if="label">
|
||||
{{ label }}
|
||||
</template>
|
||||
<i
|
||||
v-if="tooltipKey"
|
||||
v-clean-tooltip="t(tooltipKey)"
|
||||
class="icon icon-info icon-lg"
|
||||
/>
|
||||
<i
|
||||
v-else-if="tooltip"
|
||||
v-clean-tooltip="tooltip"
|
||||
class="icon icon-info icon-lg"
|
||||
/>
|
||||
</h3>
|
||||
</slot>
|
||||
<legend>
|
||||
<slot name="label">
|
||||
<h3>
|
||||
<t
|
||||
v-if="labelKey"
|
||||
:k="labelKey"
|
||||
/>
|
||||
<template v-else-if="label">
|
||||
{{ label }}
|
||||
</template>
|
||||
<i
|
||||
v-if="tooltipKey"
|
||||
v-clean-tooltip="t(tooltipKey)"
|
||||
class="icon icon-info icon-lg"
|
||||
/>
|
||||
<i
|
||||
v-else-if="tooltip"
|
||||
v-clean-tooltip="tooltip"
|
||||
class="icon icon-info icon-lg"
|
||||
/>
|
||||
</h3>
|
||||
</slot>
|
||||
</legend>
|
||||
</div>
|
||||
|
||||
<!-- Group -->
|
||||
|
|
@ -266,7 +268,7 @@ export default defineComponent({
|
|||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</template>
|
||||
|
||||
<style lang='scss'>
|
||||
|
|
|
|||
|
|
@ -144,3 +144,9 @@ HR.vertical {
|
|||
.force-wrap { @include force-wrap }
|
||||
.bordered-section { @include bordered-section }
|
||||
.section-divider { @include section-divider }
|
||||
|
||||
fieldset {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
margin-inline: 0;
|
||||
}
|
||||
|
|
@ -103,9 +103,6 @@ export default {
|
|||
|
||||
<template>
|
||||
<div>
|
||||
<p class="set-landing-leadin">
|
||||
{{ t('landing.landingPrefs.body') }}
|
||||
</p>
|
||||
<RadioGroup
|
||||
id="login-route"
|
||||
:value="afterLoginRoute"
|
||||
|
|
@ -113,6 +110,11 @@ export default {
|
|||
:options="routeRadioOptions"
|
||||
@update:value="updateLoginRoute"
|
||||
>
|
||||
<template #label>
|
||||
<p class="set-landing-leadin">
|
||||
{{ t('landing.landingPrefs.body') }}
|
||||
</p>
|
||||
</template>
|
||||
<template #2="{option}">
|
||||
<div class="custom-page">
|
||||
<RadioButton
|
||||
|
|
|
|||
Loading…
Reference in New Issue