[Update] UI placeholder searchbar
This commit is contained in:
parent
28a8c1e63d
commit
646c423d9b
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="border border-C bg-A rounded-md w-full relative items-center">
|
<div class="border border-C bg-A rounded-md w-full relative items-center">
|
||||||
<input v-model="searchText" type="text" placeholder="Cari ..."
|
<input v-model="searchText" type="text" :placeholder="props.placeholder"
|
||||||
class="focus:outline-none focus:ring-2 focus:ring-blue-400 rounded-md w-full px-3 py-2 "
|
class="focus:outline-none focus:ring-2 focus:ring-blue-400 rounded-md w-full px-3 py-2 "
|
||||||
@input="$emit('update:search', searchText)" />
|
@input="$emit('update:search', searchText)" />
|
||||||
<div class="absolute right-3 top-1/2 -translate-y-1/2 text-C">
|
<div class="absolute right-3 top-1/2 -translate-y-1/2 text-C">
|
||||||
@ -11,6 +11,12 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
placeholder: {
|
||||||
|
type: String,
|
||||||
|
default: "Cari ..."
|
||||||
|
},
|
||||||
|
});
|
||||||
const searchText = ref("");
|
const searchText = ref("");
|
||||||
defineEmits(["update:search"]);
|
defineEmits(["update:search"]);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
<div class="w-full md:w-64 my-3 mb-9">
|
<div class="w-full md:w-64 my-3 mb-9">
|
||||||
<searchbar v-model:search="searchQuery"/>
|
<searchbar v-model:search="searchQuery" placeholder="Cari nama atau scan barcode item"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template v-if="activeTab == 'tabel'">
|
<template v-if="activeTab == 'tabel'">
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<div class="w-full flex justify-end">
|
<div class="w-full flex justify-end">
|
||||||
<div class="flex flex-col gap-3 justify-between w-full md:w-75 my-3">
|
<div class="flex flex-col gap-3 justify-between w-full md:w-75 my-3">
|
||||||
<Searchbar v-model:search="searchQuery" />
|
<Searchbar v-model:search="searchQuery" placeholder="Cari nama nampan"/>
|
||||||
<div class="flex w-full gap-2" v-if="isAdmin">
|
<div class="flex w-full gap-2" v-if="isAdmin">
|
||||||
<button @click="openModal" class="px-4 py-2 sm:px-2 sm:py-1 hover:bg-B bg-C rounded-md shadow w-full">
|
<button @click="openModal" class="px-4 py-2 sm:px-2 sm:py-1 hover:bg-B bg-C rounded-md shadow w-full">
|
||||||
Tambah Nampan
|
Tambah Nampan
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user