-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b47331f
commit 451f976
Showing
7 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
<script setup lang="ts"> | ||
import OtpInput from '@/components/OtpInput.vue'; | ||
</script> | ||
|
||
<template> | ||
<div> | ||
OTP Input | ||
<otp-input /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ | |
|
||
html { | ||
font-size: 16px; | ||
font-family: 'Poppins', sans-serif; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<template> | ||
<div class="otp-input"> | ||
<input class="otp-input__input" type="text" autofocus /> | ||
<input class="otp-input__input" type="text" disabled /> | ||
<input class="otp-input__input" type="text" disabled /> | ||
<input class="otp-input__input" type="text" disabled /> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
.otp-input { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
column-gap: 10px; | ||
} | ||
.otp-input__input { | ||
height: 45px; | ||
width: 42px; | ||
border-radius: 6px; | ||
outline: none; | ||
font-size: 1.125rem; | ||
text-align: center; | ||
border: 1px solid #ddd; | ||
} | ||
.otp-input__input:focus { | ||
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { shallowMount } from '@vue/test-utils'; | ||
|
||
import OtpInput from '@/components/OtpInput.vue'; | ||
|
||
describe('OtpInput.vue', () => { | ||
it('renders successfully', () => { | ||
const wrapper = shallowMount(OtpInput); | ||
|
||
expect(wrapper.vm).toBeDefined(); | ||
}); | ||
}); |