-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(frontend): extract common input text component
- Loading branch information
1 parent
d549d9f
commit c72d15e
Showing
6 changed files
with
28 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
<script lang="ts"> | ||
import { Input } from '@dfinity/gix-components'; | ||
import InputText from '$lib/components/ui/InputText.svelte'; | ||
import { i18n } from '$lib/stores/i18n.store'; | ||
export let contractAddress = ''; | ||
</script> | ||
|
||
<div class="stretch"> | ||
<label for="destination" class="px-4.5 font-bold">{$i18n.tokens.text.contract_address}:</label> | ||
<Input | ||
<InputText | ||
name="contractAddress" | ||
inputType="text" | ||
required | ||
bind:value={contractAddress} | ||
placeholder={$i18n.tokens.placeholder.enter_contract_address} | ||
spellcheck={false} | ||
/> | ||
</div> |
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
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,12 @@ | ||
<script lang="ts"> | ||
import { Input } from '@dfinity/gix-components'; | ||
export let value = ''; | ||
export let name: string; | ||
export let placeholder: string; | ||
export let required = true; | ||
</script> | ||
|
||
<Input {name} inputType="text" {required} bind:value {placeholder} spellcheck={false} on:nnsInput> | ||
<slot name="inner-end" slot="inner-end" /> | ||
</Input> |