Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Adds number input style and doc. Bumps package version. (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZachBaird authored Apr 13, 2023
1 parent 2ef333c commit e23ace1
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/.vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default {
{ text: 'Text Logo', link: '/components/text-logo' },
{ text: 'Slider', link: '/components/slider' },
{ text: 'Text Inputs', link: '/components/text-inputs' },
{ text: 'Number Inputs', link: '/components/number-inputs' },
{ text: 'Search Filter', link: '/components/search-filter' },
{ text: 'Toggle', link: '/components/toggle' },
{ text: 'Promotion', link: '/components/promotion' },
Expand Down
20 changes: 20 additions & 0 deletions docs/components/number-inputs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Number Inputs

<script setup>
import { ref } from "vue";

const input = ref(0)
</script>
<DemoContainer>
<input v-model="input" type="number" />
</DemoContainer>

```vue
<script setup>
import { ref } from "vue";
const input = ref(0)
</script>
<input v-model="input" type="number" />
```
9 changes: 9 additions & 0 deletions lib/assets/styles/defaults.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ a.uncolored {
}

input[type='text'],
input[type='number'],
textarea {
border-radius: var(--radius-md);
box-sizing: border-box;
Expand Down Expand Up @@ -91,6 +92,14 @@ textarea {
}
}

input[type='number'] {
&::-webkit-inner-spin-button,
&::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
}

.iconified-input {
align-items: center;
display: inline-flex;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "omorphia",
"type": "module",
"version": "0.4.5",
"version": "0.4.6",
"files": [
"dist"
],
Expand Down

0 comments on commit e23ace1

Please sign in to comment.