mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 19:05:06 +03:00
## What kind of change does this PR introduce? UI updates to platform webhooks. ## What is the new behavior? - `Webhooks` icon on empty state - Better text wrapping/overflow handling on table - Clearer endpoint deletion dialog | After | | --- | | <img width="1024" height="563" alt="Webhooks Toolshed Supabase-A3AF1CE1-B489-450F-9FD7-AE1B1BC0C999" src="https://github.com/user-attachments/assets/6606922d-fd39-400e-bc2d-99806755fc09" /> | | <img width="1024" height="563" alt="Webhooks Toolshed Supabase-00EF8F02-A3F2-477C-ADDB-68996D6C16E3" src="https://github.com/user-attachments/assets/705a1d78-4366-4ea4-b538-99eb368a3997" /> | | <img width="1024" height="563" alt="Webhooks Toolshed Supabase-902AC0EC-D0D2-471A-B241-C90FA8F50883" src="https://github.com/user-attachments/assets/97ff1267-b31b-442f-ad14-62b0bd24ac46" /> |
Writing components
Where to create your components
- For components that declare the general structure and layout of a page:
/components/layouts/xxx
- For components that are tightly coupled to a specific interface:
/components/interfaces/xxx
- For components that are meant to be reusable across multiple pages:
/components/ui/xxx
- Note: We're gradually moving files out of the
to-be-cleanedfolder into the respective folders as we refactor
Component structure
- If a component has constants and utility methods that are tightly coupled to itself, keep them close to the component and enclose them in a folder with an
index.tsxas an entry point - Otherwise it can just be a file on its own
- For example:
-
components/ui - SampleComponentA - SampleComponentA.tsx - SampleComponentA.constants.ts - SampleComponentA.utils.ts - SampleComponentA.types.ts - index.ts - SampleComponentB.tsx
-
Template for building components
// Declare the prop types of your component
interface ComponentAProps {
sampleProp: string
}
// Name your component accordingly
const ComponentA = ({ sampleProp }: ComponentAProps) => {
return <div>ComponentA: {sampleProp}</div>
}
export default ComponentA