mirror of
https://github.com/supabase/supabase.git
synced 2026-10-11 20:35:07 +03:00
## What kind of change does this PR introduce? UI polish ## What is the current behavior? Various UI rough edges that are tiny but add up. ## What is the new behavior? - Empty state for Data API: Replaced `Link` that had overly-specific styles with `InlineLink` - Copywriting improvements on Account | Before | After | | --- | --- | | <img width="1024" height="560" alt="Integrations Supabase-CDDA8DBC-57D8-4D43-A1BD-0D935D9F2442" src="https://github.com/user-attachments/assets/1af9abb0-166b-490d-a07d-e4eb7144b558" /> | <img width="1024" height="560" alt="Integrations Supabase-E8CE34C7-D2AB-4842-93AB-04BD42D94CAC" src="https://github.com/user-attachments/assets/f0d911ea-72c2-4e1e-8d16-7effb9847196" /> | | <img width="1024" height="560" alt="Account Settings Supabase" src="https://github.com/user-attachments/assets/f12c76c7-5912-4bc3-8cbb-df27588add51" /> | <img width="1024" height="560" alt="Account Settings Supabase" src="https://github.com/user-attachments/assets/4c926313-9ff1-4e13-9546-c407dca4e7bf" /> | --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
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