Files
supabase__supabase/apps/studio/components/interfaces/Storage/EmptyBucketState.tsx
Gildas Garcia b30db91d71 chore: cleanup UI patterns exports (#47406)
## Problem

We now export components under a subpath in ui-patterns to avoid barrel
files as they slow down every tools (from IDE to linters, etc.) and may
also affect bundles our users have to download.

## Solution

- Remove the UI patterns index file
- Fix invalid impors
2026-06-30 09:23:17 +02:00

31 lines
803 B
TypeScript

import { BucketPlus } from 'icons'
import { EmptyStatePresentational } from 'ui-patterns/EmptyStatePresentational'
import { CreateBucketButton } from './NewBucketButton'
import { BUCKET_TYPES } from './Storage.constants'
interface EmptyBucketStateProps {
bucketType: keyof typeof BUCKET_TYPES
className?: string
onCreateBucket: () => void
}
export const EmptyBucketState = ({
bucketType,
className,
onCreateBucket,
}: EmptyBucketStateProps) => {
const config = BUCKET_TYPES[bucketType]
return (
<EmptyStatePresentational
icon={BucketPlus}
title={`Create ${config.article} ${config.singularName} bucket`}
description={config.valueProp}
className={className}
>
<CreateBucketButton onClick={onCreateBucket} />
</EmptyStatePresentational>
)
}