-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sdk): add custom screens to IAM dialog (#791)
* refactor: mode default routes to seperate file * feat: add props for custom component * feat: add custom components link in sidebar * feat: register custom components to the router * feat: export layout component for custom screens * refactor: rename props and interface to custom Screen * Update sdks/js/packages/core/react/components/organization/profile.tsx Co-authored-by: Gaurav Singh <[email protected]> --------- Co-authored-by: Gaurav Singh <[email protected]>
- Loading branch information
1 parent
fbf670a
commit d8a4b68
Showing
7 changed files
with
417 additions
and
300 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Flex, Text } from '@raystack/apsara'; | ||
import { PropsWithChildren } from 'react'; | ||
import styles from './layout.module.css'; | ||
|
||
interface LayoutProps { | ||
title: string; | ||
} | ||
|
||
export function Layout({ title, children }: PropsWithChildren<LayoutProps>) { | ||
return ( | ||
<Flex direction="column" style={{ width: '100%' }}> | ||
<Flex className={styles.header}> | ||
<Text size={6}>{title}</Text> | ||
</Flex> | ||
<Flex direction="column" gap="large" className={styles.container}> | ||
{children} | ||
</Flex> | ||
</Flex> | ||
); | ||
} |
10 changes: 10 additions & 0 deletions
10
sdks/js/packages/core/react/components/Layout/layout.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.header { | ||
padding: 16px 48px; | ||
border-bottom: 1px solid var(--border-subtle); | ||
gap: 8px; | ||
} | ||
|
||
.container { | ||
padding: 32px 48px; | ||
overflow: scroll; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.