Files
supabase/apps/studio/components/ui/NoPermission.tsx
T
Ivan VasilovandJoshen Lim 05a542ccea chore: Migrate all feather icons to lucide icons (#29038)
* Add lucide-react to docs (to make the autocomplete work).

* Migrate the docs app icons.

* Migrate the ui-patterns.

* Remove the old icons from ui package.

* Migrate the www app from react-feather icons.

* Migrate all of studio icons.

* Migrate the only component in design-system.

* Fix an old import in ui package. Revert an import in docs app.

* Fix some pages in www.

* Remove unneeded files used in generation of icons.

* Fix a prettier error.

* Fix more issues in www.

* Fix an issue in Log Date picker.

* Replace all string sizes with number sizes because the icons grew in some cases.

* Fix more imports in security page.

* Fix an extra import.

* Remove the size prop from all icons if they're in a button and they match the button size.

* Minor fixes for docs and www.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-09-04 19:46:21 +08:00

48 lines
1.2 KiB
TypeScript

import { AlertCircle } from 'lucide-react'
interface NoPermissionProps {
resourceText: string
isFullPage?: boolean
}
const NoPermission = ({ resourceText, isFullPage = false }: NoPermissionProps) => {
const NoPermissionMessage = () => (
<div
className={[
'block w-full rounded border border-opacity-20 py-4 px-6',
'border-overlay bg-surface-200',
].join(' ')}
>
<div className="flex space-x-3">
<div className="mt-1">
<AlertCircle size={20} />
</div>
<div className="flex w-full items-center justify-between">
<div className="space-y-1">
<p className="text-sm">You need additional permissions to {resourceText}</p>
<div>
<p className="text-sm text-foreground-light">
Contact your organization owner or administrator for assistance.
</p>
</div>
</div>
</div>
</div>
</div>
)
if (isFullPage) {
return (
<div className="flex h-full items-center justify-center">
<div className="w-[550px]">
<NoPermissionMessage />
</div>
</div>
)
} else {
return <NoPermissionMessage />
}
}
export default NoPermission