mirror of
https://github.com/supabase/supabase.git
synced 2026-09-22 13:37:53 +08:00
b30db91d71
## 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
31 lines
803 B
TypeScript
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>
|
|
)
|
|
}
|