découpage de l'application en composants riot

This commit is contained in:
2026-03-18 12:49:28 +01:00
parent f9b19326f8
commit bd26b0f27b
5 changed files with 85 additions and 45 deletions
+27
View File
@@ -0,0 +1,27 @@
<search-bar>
<div>
<input
type="text"
placeholder="Ex : BUT informatique"
oninput={ updateQuery }
value={ state.query }
/>
<button onclick={ submitSearch }>Rechercher</button>
</div>
<script>
export default {
state: {
query: ''
},
updateQuery(e) {
this.update({ query: e.target.value })
},
submitSearch() {
this.props.onsearch(this.state.query)
}
}
</script>
</search-bar>