mirror of
https://github.com/supabase/supabase.git
synced 2026-12-05 07:59:03 +00:00
## Problem Default buttons inside Admonition actions are translucent in the following circumstances: - Light mode: button hover - Dark mode: static button This means they show the alert surface (yellow, red, grey, etc) unintentionally. ## Solution Give each independent action its own FloatingPlate, with transparent gaps between buttons. Explicit groups share one plate; fragments are flattened. Full-width groups retain responsive sizing, while single buttons stay snug. | Before | After | | --- | --- | | <img width="1510" height="256" alt="CleanShot 2026-10-27 at 15 32 14@2x" src="https://github.com/user-attachments/assets/2c1c285e-ffb3-4b26-a186-ce39a9b597b3" /> | <img width="1508" height="248" alt="CleanShot 2026-10-27 at 15 32 30@2x" src="https://github.com/user-attachments/assets/1cb86562-2227-4792-a60d-69dc1a06234d" /> | ## Review instructions 1. Open [Admonition examples](https://design-system-git-dnywh-fix-admonition-floating-plate-supabase.vercel.app/design-system/docs/fragments/admonition) and find the examples with action buttons. 2. Light mode: hover the default action buttons. 3. Dark mode: just compare against the [production design system](https://supabase.com/design-system/docs/fragments/admonition), statically. Notice the buttons retain their standard fill.
20 lines
493 B
TypeScript
20 lines
493 B
TypeScript
import { Button } from 'ui'
|
|
import { Admonition } from 'ui-patterns/Admonition'
|
|
|
|
export default function AdmonitionDemo() {
|
|
return (
|
|
<Admonition
|
|
type="default"
|
|
layout="responsive"
|
|
title="Disk management has moved"
|
|
description="Disk management is now handled alongside Project Compute on the Compute and Disk page."
|
|
actions={
|
|
<>
|
|
<Button>Go to Compute and Disk</Button>
|
|
<Button>Learn more</Button>
|
|
</>
|
|
}
|
|
/>
|
|
)
|
|
}
|