Files
supabase/apps/studio/components/ui/NoSearchResults.tsx
T
Saxon FletcherandJoshen Lim db4ae7e326 Refine the policies page (#38204)
* refine the policies page

* minor fixes

* Fix TS

* Do not transform table name in policy row table header

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-26 22:09:17 +07:00

37 lines
888 B
TypeScript

import { Button, cn } from 'ui'
export interface NoSearchResultsProps {
searchString: string
onResetFilter?: () => void
className?: string
}
export const NoSearchResults = ({
searchString,
onResetFilter,
className,
}: NoSearchResultsProps) => {
return (
<div
className={cn(
'bg-surface-100 border border-default px-6 py-4 rounded flex items-center justify-between',
className
)}
>
<div className="space-y-1">
<p className="text-sm text-foreground">No results found</p>
<p className="text-sm text-foreground-light">
Your search for "{searchString}" did not return any results
</p>
</div>
{onResetFilter !== undefined && (
<Button type="default" onClick={() => onResetFilter()}>
Reset filter
</Button>
)}
</div>
)
}
export default NoSearchResults