mirror of
https://github.com/supabase/supabase.git
synced 2026-10-11 12:25:05 +03:00
* decouple editor panel from global state * refactor again * dont close assistant * remove async * onsave props * Fix TS errors * Remove editorPanel state from app-state, use useHotKey hooks for keyboard shortcuts * Minor UX improvements to EditorPanel --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
24 lines
569 B
TypeScript
24 lines
569 B
TypeScript
import { PropsWithChildren } from 'react'
|
|
|
|
import { useAiAssistantStateSnapshot } from 'state/ai-assistant-state'
|
|
import { cn } from 'ui'
|
|
|
|
/**
|
|
* Standardized padding and width layout for non-custom reports
|
|
*/
|
|
const ReportPadding = ({ children }: PropsWithChildren<{}>) => {
|
|
const snap = useAiAssistantStateSnapshot()
|
|
|
|
return (
|
|
<div
|
|
className={cn(
|
|
'flex flex-col gap-4 px-5 py-6 mx-auto 1xl:px-28 lg:px-16 2xl:px-32 w-full',
|
|
snap.open ? 'xl:px-6' : 'xl:px-22'
|
|
)}
|
|
>
|
|
{children}
|
|
</div>
|
|
)
|
|
}
|
|
export default ReportPadding
|