ruvector/studio/components/interfaces/Storage/NewBucketButton.tsx
rUv 814f595995 feat(studio): Add complete RuVector Studio application
Major additions:
- Complete Next.js studio application with 1600+ components
- Docker support (Dockerfile.combined, docker-compose.yml)
- GCP deployment documentation and benchmarks
- SQL benchmark scripts for performance testing
- Sentry integration for monitoring
- Comprehensive test suite and mocks

Studio features:
- Dashboard and admin interfaces
- Data visualization components
- Authentication and user management
- API integration with RuVector backend
- Static data and public assets

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-06 23:04:48 +00:00

34 lines
924 B
TypeScript

import { PermissionAction } from '@supabase/shared-types/out/constants'
import { Plus } from 'lucide-react'
import { MouseEventHandler } from 'react'
import { ButtonTooltip } from 'components/ui/ButtonTooltip'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
export const CreateBucketButton = ({
onClick,
}: {
onClick?: MouseEventHandler<HTMLButtonElement>
}) => {
const { can: canCreateBuckets } = useAsyncCheckPermissions(PermissionAction.STORAGE_WRITE, '*')
return (
<ButtonTooltip
block
size="tiny"
type="primary"
className="w-fit"
icon={<Plus size={14} />}
disabled={!canCreateBuckets}
onClick={onClick}
tooltip={{
content: {
side: 'bottom',
text: !canCreateBuckets ? 'You need additional permissions to create buckets' : undefined,
},
}}
>
New bucket
</ButtonTooltip>
)
}