Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Add BBTableSearch

Tianzhou Chen5cdaed72c6ee
diff --git a/frontend/src/bbkit/BBTable/BBTableSearch.vue b/frontend/src/bbkit/BBTable/BBTableSearch.vue
new file mode 100644
index 0000000000..2518f25497
--- /dev/null
+++ b/frontend/src/bbkit/BBTable/BBTableSearch.vue
@@ -0,0 +1,43 @@
+<template>
+ <div class="">
+ <label for="search" class="sr-only">Search</label>
+ <div class="relative rounded-md shadow-sm">
+ <div
+ class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"
+ aria-hidden="true"
+ >
+ <!-- Heroicon name: solid/search -->
+ <svg
+ class="mr-3 h-4 w-4 text-control"
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 20 20"
+ fill="currentColor"
+ aria-hidden="true"
+ >
+ <path
+ fill-rule="evenodd"
+ d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z"
+ clip-rule="evenodd"
+ />
+ </svg>
+ </div>
+ <input
+ type="text"
+ name="search"
+ id="search"
+ class="focus:ring-main focus:border-main block w-full pl-9 sm:text-sm border-control-border rounded-md"
+ placeholder="Search"
+ @input="$emit('change-text', $event.target.value)"
+ />
+ </div>
+ </div>
+</template>
+
+<script lang="ts">
+export default {
+ name: "BBTableSearch",
+ emits: ["change-text"],
+ props: {},
+ setup(props, ctx) {},
+};
+</script>
diff --git a/frontend/src/bbkit/BBTable/index.ts b/frontend/src/bbkit/BBTable/index.ts
index 566433634c..65d4618245 100644
--- a/frontend/src/bbkit/BBTable/index.ts
+++ b/frontend/src/bbkit/BBTable/index.ts
@@ -1,6 +1,13 @@
import BBTable from "./BBTable.vue";
import BBTableCell from "./BBTableCell.vue";
import BBTableHeaderCell from "./BBTableHeaderCell.vue";
+import BBTableSearch from "./BBTableSearch.vue";
import BBTableTabFilter from "./BBTableTabFilter.vue";
-export { BBTable, BBTableCell, BBTableHeaderCell, BBTableTabFilter };
+export {
+ BBTable,
+ BBTableCell,
+ BBTableHeaderCell,
+ BBTableSearch,
+ BBTableTabFilter,
+};
diff --git a/frontend/src/bbkit/index.ts b/frontend/src/bbkit/index.ts
index 38f0251044..574a1dff55 100644
--- a/frontend/src/bbkit/index.ts
+++ b/frontend/src/bbkit/index.ts
@@ -12,6 +12,7 @@ import {
BBTable,
BBTableCell,
BBTableHeaderCell,
+ BBTableSearch,
BBTableTabFilter,
} from "./BBTable";
@@ -29,5 +30,6 @@ export {
BBTable,
BBTableCell,
BBTableHeaderCell,
+ BBTableSearch,
BBTableTabFilter,
};