Add numeric input

This commit is contained in:
Georges KABBOUCHI 2021-09-06 01:28:42 +03:00
parent ee51fa7155
commit d2bca27ab6
2 changed files with 14 additions and 1 deletions

View File

@ -67,6 +67,15 @@
@input="$event => component.onInput($event)"
/>
<input-numeric
v-else-if="component.type === 'input-numeric'"
:key="index"
:value="component.value"
:error="component.error"
:placeholder="component.placeholder()"
@input="$event => component.onInput($event)"
/>
<SidebarContextHeading
v-else-if="component.type === 'heading'"
:key="index"
@ -120,8 +129,9 @@ import InputAmount from "~/components/common/input/InputAmount.vue";
import { useToken } from "~/composables/useToken";
import ButtonCTA from "~/components/common/input/ButtonCTA.vue";
import ValueDisplay from "../components/ValueDisplay.vue";
import InputNumeric from "~/components/common/input/InputNumeric.vue";
export default defineComponent({
components: { InputAmount, ButtonCTA, ValueDisplay },
components: { InputAmount, ButtonCTA, ValueDisplay, InputNumeric },
props: {
protocol: {
type: String,

View File

@ -37,6 +37,7 @@ export interface IStrategyToken {
export enum StrategyComponentType {
// INPUT = "input",
INPUT_NUMERIC = "input-numeric",
INPUT_AMOUNT = "input-amount",
INPUT_WITH_TOKEN = "input-with-token",
@ -48,6 +49,8 @@ export enum StrategyComponentType {
export type StrategyComponentParameterMap = {
// [StrategyInputType.INPUT]: {};
[StrategyComponentType.INPUT_NUMERIC]: {};
[StrategyComponentType.INPUT_AMOUNT]: {
tokenKey: string;
};