-
Notifications
You must be signed in to change notification settings - Fork 44
feat(admin-ui): unify page header height and surface icon prop on Views #1606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: chore/sdk-admin-apsara-v1
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| import type { ReactNode } from "react"; | ||
| import { DataTable } from "@raystack/apsara-v1"; | ||
| import { PageHeader } from "../../components/PageHeader"; | ||
| import styles from "./products.module.css"; | ||
|
|
@@ -13,14 +14,17 @@ const defaultPageHeader = { | |
| export const ProductsHeader = ({ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This component can also be skipped and inlined instead
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
| header = defaultPageHeader, | ||
| onBreadcrumbClick, | ||
| icon, | ||
| }: { | ||
| header?: typeof defaultPageHeader; | ||
| // eslint-disable-next-line no-unused-vars -- callback param name is for type documentation | ||
| onBreadcrumbClick?: (item: { name: string; href?: string }) => void; | ||
| icon?: ReactNode; | ||
| }) => { | ||
| return ( | ||
| <PageHeader | ||
| title={header.title} | ||
| icon={icon} | ||
| breadcrumb={header.breadcrumb} | ||
| onBreadcrumbClick={onBreadcrumbClick} | ||
| className={styles.header} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| import type { ReactNode } from "react"; | ||
| import { DataTable } from "@raystack/apsara-v1"; | ||
| import { PageHeader } from "../../components/PageHeader"; | ||
| import styles from "./roles.module.css"; | ||
|
|
@@ -7,10 +8,11 @@ const pageHeader = { | |
| breadcrumb: [] as { name: string; href?: string }[], | ||
| }; | ||
|
|
||
| export const RolesHeader = () => { | ||
| export const RolesHeader = ({ icon }: { icon?: ReactNode }) => { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This component can also be skipped and inlined instead
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
| return ( | ||
| <PageHeader | ||
| title={pageHeader.title} | ||
| icon={icon} | ||
| breadcrumb={pageHeader.breadcrumb} | ||
| className={styles.header} | ||
| > | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This component can be skipped and the code can be inlined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.