Skip to content

Commit 855269e

Browse files
authored
Update README.md
1 parent e10a9cf commit 855269e

File tree

1 file changed

+36
-10
lines changed

1 file changed

+36
-10
lines changed

src/components/form-spinbutton/README.md

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,30 @@ As with other form controls, `<b-form-spinbutton>` supports small and large sizi
134134

135135
TBD
136136

137+
```html
138+
<template>
139+
<div>
140+
<label for="sb-inline">Inline spin button</label>
141+
<b-form-spinbutton id="sb-inline" v-model="value" inline></b-form-spinbutton>
142+
</div>
143+
</template>
144+
145+
<script>
146+
export default {
147+
data() {
148+
return {
149+
value: 50
150+
}
151+
}
152+
}
153+
</script>
154+
155+
<!-- b-form-spinbotton-inline.vue -->
156+
```
157+
158+
The spin button will automatically adjust it's width to fit the displayed value. See the
159+
[Width section](#width) before for details on controling or setting the width.
160+
137161
### Vertical
138162

139163
Spinbuttons can be oriented in vertical mode:
@@ -159,8 +183,8 @@ Spinbuttons can be oriented in vertical mode:
159183
<!-- b-form-spinbotton-vertical.vue -->
160184
```
161185

162-
Vertical spin buttons can also be sized using hte `size` prop. When in vertical mode, the
163-
spinbutton is rendered as an inline element.
186+
Vertical spin buttons can also be sized using the `size` prop. When in vertical mode, the spin button
187+
is rendered as an inline element.
164188

165189
The spin button will automatically adjust it's width to fit the displayed value. See the
166190
[Width section](#width) before for details on controling or setting the width.
@@ -267,14 +291,16 @@ prop places the component in a readonly state (focusable, but the value cannot b
267291

268292
```html
269293
<template>
270-
<div>
271-
<label for="sb-disabled">Disabled spin button</label>
272-
<b-form-spinbutton id="sb-disabled" v-model="value" disabled></b-form-spinbutton>
273-
</div>
274-
<div>
275-
<label for="sb-readonly" class="mt-3">Readonly spin button</label>
276-
<b-form-spinbutton id="sb-readonly" v-model="value" readonly></b-form-spinbutton>
277-
</div>
294+
<b-row>
295+
<b-col md="6" class="mb-2">
296+
<label for="sb-disabled">Disabled spin button</label>
297+
<b-form-spinbutton id="sb-disabled" v-model="value" disabled></b-form-spinbutton>
298+
</b-col>
299+
<b-col md="6" class="mb-2">
300+
<label for="sb-readonly" class="">Readonly spin button</label>
301+
<b-form-spinbutton id="sb-readonly" v-model="value" readonly></b-form-spinbutton>
302+
</b-col>
303+
</b-row>
278304
</template>
279305

280306
<script>

0 commit comments

Comments
 (0)