mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
feat create search component + implementation #discussion_r909406009
This commit is contained in:
1 parent
211f916598
commit
36ef28e4e5
6 files changed
+26
-47
No files matched your search
@@ -23,3 +23,4 @@ export { default as SwitchBox } from './switchBox.svelte';
|
||||
export { default as SwitchBoxes } from './switchBoxes.svelte';
|
||||
export { default as Alert } from './alert.svelte';
|
||||
export { default as Box } from './box.svelte';
|
||||
export { default as Search } from './search.svelte';
|
||||
@@ -0,0 +1,13 @@
|
||||
<script lang="ts">
|
||||
import { InputSearch } from '$lib/elements/forms';
|
||||
|
||||
export let search: string;
|
||||
export let placeholder: string;
|
||||
</script>
|
||||
|
||||
<div class="u-flex u-gap-12 common-section u-main-space-between">
|
||||
<div class="u-flex-basis-50-percent">
|
||||
<InputSearch {placeholder} bind:value={search} />
|
||||
</div>
|
||||
<slot />
|
||||
</div>
|
||||
@@ -9,7 +9,7 @@
|
||||
TableCellHead,
|
||||
TableCellLink
|
||||
} from '$lib/elements/table';
|
||||
import { Empty, Pagination } from '$lib/components';
|
||||
import { Empty, Pagination, Search } from '$lib/components';
|
||||
import { collection } from './store';
|
||||
import { Container } from '$lib/layout';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
@@ -35,20 +35,12 @@
|
||||
{#await request}
|
||||
<div aria-busy="true" />
|
||||
{:then response}
|
||||
<div class="u-flex u-gap-12 common-section u-main-space-between">
|
||||
<div class="input-text-wrapper u-stretch">
|
||||
<input
|
||||
type="search"
|
||||
placeholder="Search by ID"
|
||||
class="input-text"
|
||||
bind:value={search} />
|
||||
<span class="icon-search" aria-hidden="true" />
|
||||
</div>
|
||||
<Search bind:search placeholder="Search by ID">
|
||||
<Button on:click={() => console.log('showCreate = true')}>
|
||||
<span class="icon-plus" aria-hidden="true" />
|
||||
<span class="text">Create Document</span>
|
||||
</Button>
|
||||
</div>
|
||||
</Search>
|
||||
{#if response.total}
|
||||
<Table>
|
||||
<TableHeader>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores';
|
||||
import { sdkForProject } from '$lib/stores/sdk';
|
||||
import { Empty, Pagination, Avatar, Copy } from '$lib/components';
|
||||
import { Empty, Pagination, Avatar, Copy, Search } from '$lib/components';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
import {
|
||||
Table,
|
||||
@@ -52,20 +52,11 @@
|
||||
</script>
|
||||
|
||||
<Container>
|
||||
<div class="u-flex u-gap-12 common-section u-main-space-between">
|
||||
<div class="input-text-wrapper u-flex-basis-50-percent">
|
||||
<input
|
||||
type="search"
|
||||
placeholder="Search Name, Email, or ID"
|
||||
class="input-text"
|
||||
bind:value={search} />
|
||||
<span class="icon-search" aria-hidden="true" />
|
||||
</div>
|
||||
|
||||
<Search bind:search placeholder="Search Name, Email, or ID">
|
||||
<Button on:click={() => (showCreate = true)}>
|
||||
<span class="icon-plus" aria-hidden="true" /> <span class="text">Create User</span>
|
||||
</Button>
|
||||
</div>
|
||||
</Search>
|
||||
{#if $usersList?.response?.total}
|
||||
<Table>
|
||||
<TableHeader>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
TableCellText
|
||||
} from '$lib/elements/table';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
import { Empty, Pagination, Avatar } from '$lib/components';
|
||||
import { Empty, Pagination, Avatar, Search } from '$lib/components';
|
||||
import Create from './_createTeam.svelte';
|
||||
import { goto } from '$app/navigation';
|
||||
import { toLocaleDateTime } from '$lib/helpers/date';
|
||||
@@ -47,20 +47,11 @@
|
||||
</script>
|
||||
|
||||
<Container>
|
||||
<div class="u-flex u-gap-12 common-section u-main-space-between">
|
||||
<div class="input-text-wrapper u-flex-basis-50-percent">
|
||||
<input
|
||||
type="search"
|
||||
placeholder="Search by Name"
|
||||
class="input-text"
|
||||
bind:value={search} />
|
||||
<span class="icon-search" aria-hidden="true" />
|
||||
</div>
|
||||
|
||||
<Search bind:search placeholder="Search by Name">
|
||||
<Button on:click={() => (showCreate = true)}>
|
||||
<span class="icon-plus" aria-hidden="true" /> <span class="text">Create Team</span>
|
||||
</Button>
|
||||
</div>
|
||||
</Search>
|
||||
{#if $teamsList?.response?.total}
|
||||
<Table>
|
||||
<TableHeader>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores';
|
||||
import { Pagination, Empty, Avatar } from '$lib/components';
|
||||
import { Pagination, Empty, Avatar, Search } from '$lib/components';
|
||||
import {
|
||||
Table,
|
||||
TableHeader,
|
||||
@@ -44,20 +44,11 @@
|
||||
</script>
|
||||
|
||||
<Container>
|
||||
<div class="u-flex u-gap-12 common-section u-main-space-between">
|
||||
<div class="input-text-wrapper u-flex-basis-50-percent">
|
||||
<input
|
||||
type="search"
|
||||
placeholder="Search by ID"
|
||||
class="input-text"
|
||||
bind:value={search} />
|
||||
<span class="icon-search" aria-hidden="true" />
|
||||
</div>
|
||||
|
||||
<Search bind:search placeholder="Search by ID">
|
||||
<Button on:click={() => (showCreate = true)}>
|
||||
<span class="icon-plus" aria-hidden="true" /> <span class="text">Add Member</span>
|
||||
</Button>
|
||||
</div>
|
||||
</Search>
|
||||
{#if $memberships.response?.total}
|
||||
<Table>
|
||||
<TableHeader>
|
||||
|
||||
Reference in new issue
Block a user