Files
abc37edaa7 chore(studio): link directly to Postgres upgrade blockers (#41527)
* validation errors

* improvements

* deprecate notice bar

* consolidate upgrade warnings

* type fixes

* rabbit

* 📝 Add docstrings to `dnywh/chore/link-to-dropped-objects` (#41528)

* 📝 Add docstrings to `dnywh/chore/link-to-dropped-objects`

Docstrings generation was requested by @dnywh.

* https://github.com/supabase/supabase/pull/41527#issuecomment-3680610884

The following files were modified:

* `apps/studio/data/config/project-upgrade-eligibility-query.ts`

* New line

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>

* Use API types instead

* Update API types

* Add manage replicas CTA to upgrade warning if unified replication and project has replicas

* Nit

* use actionable language

* gap

* simplify

* prettier

* Add URL

* better links

* add tables and encode links

* remove replication link

* nit ordering

* rabbit

* Small simplify

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-01-26 12:50:18 +08:00

40 lines
1.2 KiB
TypeScript

import { AnimatePresence, motion } from 'framer-motion'
import { type ComponentProps, type ReactNode } from 'react'
import { cn } from 'ui'
import { Admonition } from 'ui-patterns'
/**
* @deprecated Use Admonition from ui-patterns instead
* Pass actions as a prop to the Admonition component
*/
interface NoticeBarProps extends Omit<ComponentProps<typeof Admonition>, 'description'> {
title?: string
description?: string
icon?: ReactNode
visible: boolean
actions?: ReactNode
}
export function NoticeBar({ visible, description, actions, ...props }: NoticeBarProps) {
return (
<AnimatePresence>
{visible && (
<motion.div
initial={{ opacity: 0, height: 0, y: 4 }}
animate={{ opacity: 1, height: 'auto', y: 0 }}
exit={{ opacity: 0, height: 0, y: 4 }}
transition={{ duration: 0.15 }}
>
<Admonition {...props} className={cn(props.className, 'mb-0')}>
{description}
<div className="flex flex-col gap-2">
{actions && <div className="mt-2">{actions}</div>}
</div>
</Admonition>
</motion.div>
)}
</AnimatePresence>
)
}