Skip to content

Commit

Permalink
fixi(NeTextInput): minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
andre8244 committed Nov 5, 2024
1 parent c5069b0 commit 1df77ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/components/NeTextInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const props = defineProps({
},
clearSearchLabel: {
type: String,
default: 'Clear search'
default: 'Clear'
},
isPassword: {
type: Boolean,
Expand Down Expand Up @@ -234,7 +234,7 @@ function clearText() {
v-else-if="isSearch && modelValue"
class="absolute inset-y-0 right-0 flex items-center pr-3"
>
<button type="button" :disabled="disabled" @click="clearText">
<button type="button" :disabled="disabled" class="flex items-center" @click="clearText">
<span class="sr-only">{{ clearSearchLabel }}</span>
<FontAwesomeIcon
:icon="faXmark"
Expand Down
10 changes: 5 additions & 5 deletions stories/NeTextInput.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const meta = {
invalidMessage: '',
optional: false,
isSearch: false,
clearSearchLabel: 'Clear search',
clearSearchLabel: 'Clear',
disabled: false,
id: '',
isPassword: false,
Expand All @@ -33,7 +33,7 @@ const meta = {
export default meta
type Story = StoryObj<typeof meta>

const template = '<NeTextInput v-bind="args" class="max-w-md" />'
const template = '<NeTextInput v-bind="args" class="max-w-xs" />'

export const Default: Story = {
render: (args) => ({
Expand Down Expand Up @@ -100,10 +100,10 @@ export const Password: Story = {
},
template: template
}),
args: { isPassword: true, label: 'Enter password', placeholder: '' }
args: { isPassword: true, label: 'Enter password', placeholder: 'Current password' }
}

const typeNumberTemplate = '<NeTextInput v-bind="args" type="number" class="max-w-md" />'
const typeNumberTemplate = '<NeTextInput v-bind="args" type="number" class="max-w-xs" />'

export const TypeNumber: Story = {
render: (args) => ({
Expand All @@ -117,7 +117,7 @@ export const TypeNumber: Story = {
}

const templateWithTooltip =
'<NeTextInput v-bind="args" class="max-w-md">\
'<NeTextInput v-bind="args" class="max-w-xs">\
<template #tooltip>\
<NeTooltip>\
<template #content>Tooltip</template>\
Expand Down

0 comments on commit 1df77ce

Please sign in to comment.