mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Styling list header
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
442884c5b8
commit
9484d76e7a
@ -5,4 +5,19 @@
|
||||
|
||||
.searchInput>label {
|
||||
box-shadow: none!important;
|
||||
}
|
||||
|
||||
.listLayout {
|
||||
background: var(--contentColor);
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.controls {
|
||||
display: flex;
|
||||
gap: calc(var(--padding) * 2);
|
||||
}
|
||||
@ -7,10 +7,11 @@ import styles from "./list.module.scss";
|
||||
import themeStyles from "./table-theme.module.scss";
|
||||
|
||||
import React, { useState } from "react";
|
||||
import { SearchInput } from "../input";
|
||||
import { SearchInput, SearchInputUrl } from "../input";
|
||||
import type { TableOptions } from '@tanstack/react-table'
|
||||
|
||||
import { TableList } from "../table-list/table-list";
|
||||
import { NamespaceSelectFilter } from "../+namespaces/namespace-select-filter";
|
||||
|
||||
export type SearchFilter<T> = (item: T) => string;
|
||||
|
||||
@ -28,18 +29,24 @@ export function List<T>({ columns, data, title, filters }: ListProps<T>) {
|
||||
));
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="flex align-center justify-between mb-6">
|
||||
<div className="mr-6">
|
||||
<div className={styles.listLayout}>
|
||||
<div className={styles.header}>
|
||||
<div>
|
||||
{title}
|
||||
</div>
|
||||
<div>
|
||||
Showing {filteredData.length} items
|
||||
</div>
|
||||
<div className={styles.controls}>
|
||||
<NamespaceSelectFilter id="object-list-layout-namespace-select-input" />
|
||||
<SearchInputUrl />
|
||||
{/*
|
||||
<SearchInput
|
||||
value={search}
|
||||
theme="round-black"
|
||||
onChange={setSearch}
|
||||
className={styles.searchInput}
|
||||
/>
|
||||
/> */}
|
||||
</div>
|
||||
</div>
|
||||
<TableList
|
||||
@ -50,6 +57,6 @@ export function List<T>({ columns, data, title, filters }: ListProps<T>) {
|
||||
{filteredData.length == 0 && (
|
||||
<div className={styles.notFound}>No data found</div>
|
||||
)}
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { TableOptions, SortingState, Table as TableType, ColumnDef } from "@tanstack/react-table";
|
||||
import type { SortingState, Table as TableType, ColumnDef } from "@tanstack/react-table";
|
||||
import { useReactTable, getCoreRowModel, getSortedRowModel } from "@tanstack/react-table";
|
||||
import React, { HTMLProps, useMemo } from "react";
|
||||
import { createColumnHelper } from "@tanstack/react-table";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user