mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Based off user feedback, improvement for general legibility of items and light mode. | Before | After | |--------|--------| | <img width="1950" height="1416" alt="CleanShot 2026-08-26 at 17 56 33@2x" src="https://github.com/user-attachments/assets/29bc6d28-9600-4fea-af28-11097450c1e5" /> | <img width="2008" height="1446" alt="CleanShot 2026-08-26 at 17 55 47@2x" src="https://github.com/user-attachments/assets/da002085-cc8f-4baf-8bc3-ca7a605ae04b" /> | | <img width="2028" height="1472" alt="CleanShot 2026-08-26 at 17 56 46@2x" src="https://github.com/user-attachments/assets/54c810fa-c455-449d-b9c9-2c1022d12b59" /> | <img width="2034" height="1464" alt="CleanShot 2026-08-26 at 17 59 50@2x" src="https://github.com/user-attachments/assets/19094e8e-4ab5-4faf-bac7-5d8aefc70f6c" /> | <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Updated feature preview navigation with clearer selected and unselected item styling. * Applied tertiary backgrounds to accordion items. * Removed unnecessary open-state and individual item border styling. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
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 — use a named export, not a default export
export const ComponentA = ({ sampleProp }: ComponentAProps) => {
return <div>ComponentA: {sampleProp}</div>
}