Skip to content

Commit

Permalink
Add Icons
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Jul 16, 2024
1 parent c2fa6bd commit 1db3452
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

## Version History

### v3.51.1

- :rocket: Add `lock` and `user` icons to TablerInput

### v3.51.0

- :bug: Fix broken required (`*`) on input forms ow that we don't use `form-label` due to it's margins
Expand Down
14 changes: 12 additions & 2 deletions components/input/Input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<div class='input-icon'>
<span v-if='icon' class="input-icon-addon">
<IconSearch v-if='icon === "search"' :size='20' :stroke='1'/>
<IconLock v-if='icon === "lock"' :size='20' :stroke='1'/>
<IconUser v-if='icon === "user"' :size='20' :stroke='1'/>
</span>
<input
:disabled='disabled'
Expand All @@ -23,8 +25,8 @@
class="form-control"
:placeholder='placeholder||label||""'
/>
<span v-if='$slots.posticon' class="input-icon-addon">
<slot name='prepost'/>
<span v-if='loading' class="input-icon-addon">
<div class="spinner-border spinner-border-sm text-secondary" role="status"></div>
</span>
</div>
</template>
Expand All @@ -51,6 +53,8 @@
<script>
import TablerLabel from '../internal/Label.vue';
import {
IconUser,
IconLock,
IconSearch
} from '@tabler/icons-vue';
Expand All @@ -65,6 +69,10 @@ export default {
icon: {
type: String,
},
loading: {
type: Boolean,
default: false
},
required: {
type: Boolean,
default: false,
Expand Down Expand Up @@ -149,6 +157,8 @@ export default {
}
},
components: {
IconUser,
IconLock,
IconSearch,
TablerLabel
}
Expand Down

0 comments on commit 1db3452

Please sign in to comment.