Skip to content

Commit 06b0589

Browse files
committed
Small improvements
1 parent 99abd4f commit 06b0589

File tree

7 files changed

+19
-11
lines changed

7 files changed

+19
-11
lines changed

src/docs/code/basic.html.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
<input type="text" class="form-control example" value="html,css,js">
2-
<input type="text" class="form-control example" placeholder="Add a tag then press comma or Enter" />
1+
<input type="text" class="form-control" value="html,css,js" id="example-basic">
32

43
<script>
5-
document.querySelectorAll('.example').forEach((input) => {
6-
UseBootstrapTag(input)
7-
})
4+
UseBootstrapTag(document.getElementById('example-basic'))
85
</script>

src/docs/code/max.html.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- Using data-ub-tag-max attribute: -->
2-
<input type="text" class="form-control" placeholder="Enter tags (max 3)" data-ub-tag-max="3" id="example-max" />
2+
<input type="text" class="form-control" placeholder="Enter tags (max 3)" data-ub-tag-max="3" id="example-max">
33

44
<script>
55
UseBootstrapTag(document.getElementById('example-max'))

src/docs/code/methods.html.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<input type="text" class="form-control" value="html,css,js" id="example-methods" />
1+
<input type="text" class="form-control" value="html,css,js" id="example-methods">
22
<button class="btn btn-sm btn-success" type="button" id="addValue-string">addValue('react')</button>
33
<button class="btn btn-sm btn-success" type="button" id="addValue-string-with-separator">addValue('vue,svelte')</button>
44
<button class="btn btn-sm btn-success" type="button" id="addValue-array">addValue(['solid', 'qwik'])</button>

src/docs/code/onblur.html.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!-- Using data-ub-tag-no-input-onblur attribute: -->
2+
<input type="text" class="form-control" data-ub-tag-no-input-onblur id="example-no-input-onblur">
3+
4+
<script>
5+
UseBootstrapTag(document.getElementById('example-no-input-onblur'))
6+
</script>

src/docs/code/placeholder.html.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<input type="text" class="form-control" placeholder="Add a tag then press comma or Enter" id="example-placeholder">
2+
3+
<script>
4+
UseBootstrapTag(document.getElementById('example-placeholder'))
5+
</script>

src/docs/code/validation.html.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<form class="needs-validation vstack gap-3" novalidate>
22
<div>
3-
<input type="text" class="form-control example-validation" name="tags" placeholder="Add a tag" required id="example-validation" />
3+
<input type="text" class="form-control example-validation" name="tags" placeholder="Add a tag" required id="example-validation">
44
<div class="invalid-feedback">This field is required.</div>
55
<div class="valid-feedback">Looks good!</div>
66
</div>
@@ -10,11 +10,11 @@
1010
<!-- Server side: just add "is-invalid" or "is-valid" -->
1111
<div class="vstack gap-3">
1212
<div>
13-
<input type="text" class="form-control example-validation is-invalid" placeholder="Add a tag" />
13+
<input type="text" class="form-control example-validation is-invalid" placeholder="Add a tag">
1414
<div class="invalid-feedback">This field is required.</div>
1515
</div>
1616
<div>
17-
<input type="text" class="form-control example-validation is-valid" placeholder="Add a tag" value="use,bootstrap,tag" />
17+
<input type="text" class="form-control example-validation is-valid" placeholder="Add a tag" value="use,bootstrap,tag">
1818
<div class="valid-feedback">Looks good!</div>
1919
</div>
2020
</div>

vite.config.lib.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default defineConfig({
2121
dts({
2222
include: pkg.source,
2323
insertTypesEntry: true,
24-
afterBuild: () => rename('dist/use-bootstrap-tag.d.ts', pkg.types),
24+
afterBuild: () => rename(`dist/${pkg.name}.d.ts`, pkg.types),
2525
}),
2626
],
2727
})

0 commit comments

Comments
 (0)