feature: Organizations link and invitation flow implemented minimally.
This commit is contained in:
38
frontend/src/components/ui/common/SearchBar.tsx
Normal file
38
frontend/src/components/ui/common/SearchBar.tsx
Normal file
@@ -0,0 +1,38 @@
|
||||
import { Search } from 'lucide-react';
|
||||
import type { ReactNode } from 'react';
|
||||
import { Input } from './Input';
|
||||
|
||||
interface SearchBarProps {
|
||||
value: string;
|
||||
onChange: (value: string) => void;
|
||||
placeholder: string;
|
||||
onSubmit?: () => void;
|
||||
actions?: ReactNode;
|
||||
}
|
||||
|
||||
export function SearchBar({
|
||||
value,
|
||||
onChange,
|
||||
placeholder,
|
||||
onSubmit,
|
||||
actions,
|
||||
}: SearchBarProps) {
|
||||
return (
|
||||
<div className="surface-card p-4">
|
||||
<div className="flex gap-4 items-center">
|
||||
<div className="flex-1">
|
||||
<Input
|
||||
placeholder={placeholder}
|
||||
value={value}
|
||||
onChange={(e) => onChange(e.target.value)}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === 'Enter') onSubmit?.();
|
||||
}}
|
||||
icon={<Search className="h-4 w-4 icon-flat" />}
|
||||
/>
|
||||
</div>
|
||||
{actions && <div className="flex gap-2">{actions}</div>}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
27
frontend/src/components/ui/common/Table.tsx
Normal file
27
frontend/src/components/ui/common/Table.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
interface TableProps {
|
||||
headers: ReactNode;
|
||||
body: ReactNode;
|
||||
footer?: ReactNode;
|
||||
}
|
||||
|
||||
export function Table({ headers, body, footer }: TableProps) {
|
||||
return (
|
||||
<div className="surface-card overflow-hidden">
|
||||
<table className="w-full">
|
||||
<thead className="bg-background-secondary/70 border-b border-border">
|
||||
{headers}
|
||||
</thead>
|
||||
<tbody className="divide-y divide-border/60">
|
||||
{body}
|
||||
</tbody>
|
||||
</table>
|
||||
{footer && (
|
||||
<div className="px-6 py-3 border-t border-border/60 flex justify-between items-center bg-background-secondary/70">
|
||||
{footer}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user