Merge pull request '[#365] Création d'un composant de type Number' (#9) from feat/365-creation-composant-number into develop

Reviewed-on: #9
This commit was merged in pull request #9.
This commit is contained in:
2026-03-11 15:16:18 +00:00
4 changed files with 628 additions and 0 deletions

View File

@@ -0,0 +1,80 @@
<template>
<div class="grid grid-cols-1 items-start gap-6 md:grid-cols-2">
<div class="rounded-lg border p-4">
<h2 class="mb-4 text-xl font-bold">Simple</h2>
<MalioInputNumber
v-model="simpleValue"
label="Quantite"
/>
</div>
<div class="rounded-lg border p-4">
<h2 class="mb-4 text-xl font-bold">Valeur initiale</h2>
<MalioInputNumber
v-model="initialValue"
label="Participants"
/>
</div>
<div class="rounded-lg border p-4">
<h2 class="mb-4 text-xl font-bold">Avec bornes</h2>
<MalioInputNumber
v-model="boundedValue"
label="Places"
:min="1"
:max="5"
hint="Minimum 1, maximum 5"
/>
</div>
<div class="rounded-lg border p-4">
<h2 class="mb-4 text-xl font-bold">Desactive</h2>
<MalioInputNumber
v-model="disabledValue"
label="Articles"
disabled
/>
</div>
<div class="rounded-lg border p-4">
<h2 class="mb-4 text-xl font-bold">Readonly</h2>
<MalioInputNumber
v-model="readonlyValue"
label="Tickets"
readonly
hint="Valeur verrouillee"
/>
</div>
<div class="rounded-lg border p-4">
<h2 class="mb-4 text-xl font-bold">Erreur</h2>
<MalioInputNumber
v-model="errorValue"
label="Quantite"
:min="1"
error="La quantite minimale est 1"
/>
</div>
<div class="rounded-lg border p-4">
<h2 class="mb-4 text-xl font-bold">Succes</h2>
<MalioInputNumber
v-model="successValue"
label="Quantite"
success="Quantite validee"
/>
</div>
</div>
</template>
<script setup lang="ts">
import {ref} from 'vue'
const simpleValue = ref('')
const initialValue = ref('3')
const boundedValue = ref('2')
const disabledValue = ref('4')
const readonlyValue = ref('7')
const errorValue = ref('0')
const successValue = ref('2')
</script>