Skip to content

Commit

Permalink
feat: input-focused
Browse files Browse the repository at this point in the history
  • Loading branch information
jaskang committed Jan 13, 2023
1 parent 6fae868 commit da03a3b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
6 changes: 6 additions & 0 deletions docs/components/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,11 @@
<template #before>before</template>
<template #after>after</template>
</EInput>
<EInput>
<template #after>after</template>
</EInput>
<EInput>
<template #before>after</template>
</EInput>
</template>
```
11 changes: 7 additions & 4 deletions src/input/index.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
.e-input {
@apply inline-flex w-full items-stretch rounded-md text-sm shadow-sm;
&__input {
@apply flex w-full flex-1 items-center rounded-md border border-solid border-gray-300 px-3;
@apply flex w-full flex-1 items-center border border-solid border-gray-300 px-3 transition-all;
&.is-focused {
@apply z-10 border-indigo-500 ring-1 ring-indigo-500;
}
&:last-child {
@apply rounded-r-md;
}
&:first-child {
@apply rounded-l-md;
}
}
&__prefix {
@apply flex-initial pr-2;
Expand All @@ -23,9 +29,6 @@
}
&__before {
@apply rounded-l-md border-r-0;
+ .e-input__input {
@apply rounded-l-none;
}
}
&__after {
@apply rounded-r-md border-l-0;
Expand Down

1 comment on commit da03a3b

@vercel
Copy link

@vercel vercel bot commented on da03a3b Jan 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.