8000 fix: CInputRadioGroup: add inline styling option · coreui/coreui-vue@9f8aeec · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9f8aeec

Browse files
committed
fix: CInputRadioGroup: add inline styling option
1 parent ce18118 commit 9f8aeec

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

src/components/form/CInputRadioGroup.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div>
2+
<div :class="{ 'form-inline': inline }">
33
<CInputRadio
44
v-for="({value, label, props}, key) in computedOptions"
55
:key="key"
@@ -9,6 +9,7 @@
99
:checked="checked === value"
1010
@change="change($event, value)"
1111
:custom="custom"
12+
:inline="inline"
1213
v-bind="props"
1314
/>
1415
</div>
@@ -28,7 +29,8 @@ export default {
2829
},
2930
checked: String,
3031
name: String,
31-
custom: Boolean
32+
custom: Boolean,
33+
inline: Boolean
3234
},
3335
computed: {
3436
computedOptions () {

src/components/form/tests/__snapshots__/CInputRadioGroup.spec.js.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`CInputRadio renders correctly 1`] = `
4-
<div>
4+
<div
5+
class=""
6+
>
57
<div
68
class="custom-control custom-radio"
79
role="group"

src/components/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ export declare class CInputRadioGroup extends Vue {
233233
options: [string | { label: string, value: string, props?: object }]
234234
checked?: string
235235
custom?: boolean
236+
inline?: boolean
236237
}
237238

238239
export declare class CInputCheckbox extends CInputRadio {}

0 commit comments

Comments
 (0)
0