Embedded Apps
Embedded Apps
Embedded apps Stripe Dashboard के भीतर seamlessly integrate होते हैं, native UI components के रूप में feel करते हैं।
Embedding Patterns
Drawer Pattern
Side drawer में content embed करें:
import { DrawerView } from '@stripe/ui-extension-sdk/ui';
const SyncDrawer = ({ onClose }) => { return ( <DrawerView title="Brevo Sync Status" onClose={onClose}> <Box css={{ padding: 'large' }}> <SyncStatusContent /> </Box> </DrawerView> );};Modal Pattern
Full-screen modal में content दिखाएं:
import { ModalView } from '@stripe/ui-extension-sdk/ui';
const SetupModal = ({ onClose }) => { return ( <ModalView title="Brevo Setup" onClose={onClose}> <Box css={{ padding: 'xlarge' }}> <SetupWizard /> </Box> </ModalView> );};UI Component Library
Stripe का UI extension SDK pre-built components provide करता है:
import { Box, // Layout container Inline, // Inline text/content Button, // Action buttons Banner, // Status messages Badge, // Status indicators TextField, // Text input Select, // Dropdown selection Divider, // Visual separator Spinner, // Loading state Icon, // Stripe icons Link, // Navigation links} from '@stripe/ui-extension-sdk/ui';Context Access
import type { ExtensionContextValue } from '@stripe/ui-extension-sdk/context';
const MyView = ({ environment, userContext }: ExtensionContextValue) => { // Stripe account info const accountId = userContext?.account?.id; const accountName = userContext?.account?.name;
// Current object context (e.g., customer being viewed) const customerId = environment.objectContext?.id; const mode = environment.mode; // 'live' or 'test'
return <Box>{/* component */}</Box>;};अगले कदम
- Post-Install Actions, Installation के बाद onboarding
- Install Links, App distribution