Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Bruno Predot
/
tmdb_test
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Bruno Predot
2025-04-23 21:37:48 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4d0bbf42ae092efc9d0058d7141a43c5842befb0
4d0bbf42
1 parent
5cf8824b
Ajout props placeholder pour searchBar componant.
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
components/MoviesList.vue
components/SearchBar.vue
components/MoviesList.vue
View file @
4d0bbf4
<script setup lang="ts">
import SearchBar from "~/components/SearchBar.vue";
</script>
<template>
<section>
<h1 class="text-4xl font-bold mb-8 text-center">Découvrez les films populaires</h1>
<!-- Barre de recherche -->
<search-bar placeholder="Rechercher un film..."/>
</section>
</template>
...
...
components/SearchBar.vue
View file @
4d0bbf4
...
...
@@ -8,6 +8,17 @@ import { ref } from "vue";
// const emit = defineEmits([]);
//#endregion
//#region --Props--.
const props = defineProps({
placeholder: {
type: String,
required: true,
nullable: false,
default: ''
}
})
//#endregion
//#region --Data/refs--.
const searchQuery = ref("");
//#endregion
...
...
@@ -20,7 +31,7 @@ const searchQuery = ref("");
<input
v-model="searchQuery"
type="text"
placeholder="Rechercher un film...
"
:placeholder="placeholder
"
class="w-full px-4 py-3 bg-gray-800 rounded-full text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-primary"
@input="console.log('debouncedSearch à prévoir')"
/>
...
...
Please
register
or
login
to post a comment