mirror of
https://github.com/supabase/supabase.git
synced 2026-10-18 15:49:09 +03:00
## What kind of change does this PR introduce? UI fix. ## What is the current behavior? Form contents overflow horizontally on `SSOConfig`’s `AttributeMapping` section. ## What is the new behavior? These form contents no longer overflow. | Before | After | | --- | --- | | <img width="1096" height="997" alt="SSO Organization Settings Toolshed Supabase-BB366F67-15C9-40A3-8CB7-C0DA7363A2EC" src="https://github.com/user-attachments/assets/daabcba2-408a-4d44-8bf6-beb0c21d12ed" /> | <img width="1096" height="997" alt="SSO Organization Settings Toolshed Supabase-550B04A9-5B3C-4BCE-9CE3-C4B5F516BE35" src="https://github.com/user-attachments/assets/741f6178-7633-4c6d-87cd-6fdd5d0e4606" /> | --------- 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