Lots of changes:
- Switching build system to pure rollup without too much custom logic - Restructuring files - Adding Popup View - Make everything typescript compatible - Adding @hibas123/theme - Start switching to @hibas123/theme
This commit is contained in:
33
src/pages/Login/twofactors/codeInput.svelte
Normal file
33
src/pages/Login/twofactors/codeInput.svelte
Normal file
@@ -0,0 +1,33 @@
|
||||
<script>
|
||||
import Cleave from "cleave.js";
|
||||
import { onMount } from "svelte";
|
||||
|
||||
export let error;
|
||||
// export let label;
|
||||
export let value;
|
||||
export let length = 6;
|
||||
|
||||
let input;
|
||||
onMount(() => {
|
||||
const cleaveCustom = new Cleave(input, {
|
||||
blocks: [length / 2, length / 2],
|
||||
delimiter: " ",
|
||||
numericOnly: true,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.error {
|
||||
color: var(--error);
|
||||
margin-top: 4px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="floating group">
|
||||
<input id="noasidhglk" bind:this={input} autofocus bind:value />
|
||||
<span class="highlight" />
|
||||
<span class="bar" />
|
||||
<label for="noasidhglk">Code</label>
|
||||
<div class="error" style={!error ? 'display: none;' : ''}>{error}</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user