@availity/mui-page-header 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.1.1](https://github.com/Availity/element/compare/@availity/mui-page-header@0.1.0...@availity/mui-page-header@0.1.1) (2023-09-07)
6
+
5
7
  ## 0.1.0 (2023-09-06)
6
8
 
7
9
 
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import { BreadcrumbsProps } from '@availity/mui-breadcrumbs';
2
2
  import { ButtonProps } from '@availity/mui-button';
3
3
 
4
- interface ButtonsProps extends Omit<ButtonProps, 'size' | 'height'> {
4
+ interface ButtonsProps extends Omit<ButtonProps, 'size' | 'height' | 'color'> {
5
5
  key: string;
6
6
  }
7
7
  interface PageHeaderProps {
8
8
  breadcrumbs: BreadcrumbsProps;
9
- buttons?: [ButtonsProps?, ButtonsProps?];
9
+ buttons?: ButtonsProps[];
10
10
  headerText: string;
11
11
  helpLink?: string;
12
12
  }
package/dist/index.js CHANGED
@@ -47,8 +47,9 @@ var PageHeader = ({ breadcrumbs, buttons, headerText, helpLink }) => {
47
47
  children: [
48
48
  breadcrumbs && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Grid, {
49
49
  item: true,
50
- component: import_mui_breadcrumbs.Breadcrumbs,
51
- ...breadcrumbs
50
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_breadcrumbs.Breadcrumbs, {
51
+ ...breadcrumbs
52
+ })
52
53
  }),
53
54
  helpLink && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Grid, {
54
55
  item: true,
@@ -77,9 +78,10 @@ var PageHeader = ({ breadcrumbs, buttons, headerText, helpLink }) => {
77
78
  children: [
78
79
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Grid, {
79
80
  item: true,
80
- component: import_mui_typography.Typography,
81
- variant: "h1",
82
- children: headerText
81
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_typography.Typography, {
82
+ variant: "h1",
83
+ children: headerText
84
+ })
83
85
  }),
84
86
  buttons && buttons.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Grid, {
85
87
  item: true,
@@ -88,10 +90,12 @@ var PageHeader = ({ breadcrumbs, buttons, headerText, helpLink }) => {
88
90
  children: buttons == null ? void 0 : buttons.map((buttonProps) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Grid, {
89
91
  item: true,
90
92
  marginLeft: 2,
91
- component: import_mui_button.Button,
92
- ...buttonProps,
93
- size: "large",
94
- height: "100%"
93
+ height: "100%",
94
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_button.Button, {
95
+ ...buttonProps,
96
+ size: "large",
97
+ color: "secondary"
98
+ })
95
99
  }))
96
100
  })
97
101
  ]
package/dist/index.mjs CHANGED
@@ -21,8 +21,9 @@ var PageHeader = ({ breadcrumbs, buttons, headerText, helpLink }) => {
21
21
  children: [
22
22
  breadcrumbs && /* @__PURE__ */ jsx(Grid, {
23
23
  item: true,
24
- component: Breadcrumbs,
25
- ...breadcrumbs
24
+ children: /* @__PURE__ */ jsx(Breadcrumbs, {
25
+ ...breadcrumbs
26
+ })
26
27
  }),
27
28
  helpLink && /* @__PURE__ */ jsx(Grid, {
28
29
  item: true,
@@ -51,9 +52,10 @@ var PageHeader = ({ breadcrumbs, buttons, headerText, helpLink }) => {
51
52
  children: [
52
53
  /* @__PURE__ */ jsx(Grid, {
53
54
  item: true,
54
- component: Typography,
55
- variant: "h1",
56
- children: headerText
55
+ children: /* @__PURE__ */ jsx(Typography, {
56
+ variant: "h1",
57
+ children: headerText
58
+ })
57
59
  }),
58
60
  buttons && buttons.length > 0 && /* @__PURE__ */ jsx(Grid, {
59
61
  item: true,
@@ -62,10 +64,12 @@ var PageHeader = ({ breadcrumbs, buttons, headerText, helpLink }) => {
62
64
  children: buttons == null ? void 0 : buttons.map((buttonProps) => /* @__PURE__ */ jsx(Grid, {
63
65
  item: true,
64
66
  marginLeft: 2,
65
- component: Button,
66
- ...buttonProps,
67
- size: "large",
68
- height: "100%"
67
+ height: "100%",
68
+ children: /* @__PURE__ */ jsx(Button, {
69
+ ...buttonProps,
70
+ size: "large",
71
+ color: "secondary"
72
+ })
69
73
  }))
70
74
  })
71
75
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/mui-page-header",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Availity MUI PageHeader Component - part of the @availity/element design system",
5
5
  "keywords": [
6
6
  "react",
@@ -5,13 +5,13 @@ import { Breadcrumbs, BreadcrumbsProps } from '@availity/mui-breadcrumbs';
5
5
  import { Link } from '@availity/mui-link';
6
6
  import { Button, ButtonProps } from '@availity/mui-button';
7
7
 
8
- export interface ButtonsProps extends Omit<ButtonProps, 'size' | 'height'> {
8
+ export interface ButtonsProps extends Omit<ButtonProps, 'size' | 'height' | 'color'> {
9
9
  key: string;
10
10
  }
11
11
 
12
12
  export interface PageHeaderProps {
13
13
  breadcrumbs: BreadcrumbsProps;
14
- buttons?: [ButtonsProps?, ButtonsProps?];
14
+ buttons?: ButtonsProps[];
15
15
  headerText: string;
16
16
  helpLink?: string;
17
17
  }
@@ -21,7 +21,11 @@ export const PageHeader = ({ breadcrumbs, buttons, headerText, helpLink }: PageH
21
21
  <Grid component={Container} container direction="column">
22
22
  {breadcrumbs || helpLink ? (
23
23
  <Grid direction="row" item container justifyContent="space-between" marginBottom={4}>
24
- {breadcrumbs && <Grid item component={Breadcrumbs} {...breadcrumbs} />}
24
+ {breadcrumbs && (
25
+ <Grid item>
26
+ <Breadcrumbs {...breadcrumbs} />
27
+ </Grid>
28
+ )}
25
29
  {helpLink && (
26
30
  <Grid item marginLeft={2}>
27
31
  <Typography variant="body1">
@@ -33,11 +37,15 @@ export const PageHeader = ({ breadcrumbs, buttons, headerText, helpLink }: PageH
33
37
  ) : null}
34
38
 
35
39
  <Grid direction="row" item container marginBottom={2} alignItems="center" justifyContent="space-between">
36
- <Grid item component={Typography} variant="h1" children={headerText} />
40
+ <Grid item>
41
+ <Typography variant="h1" children={headerText} />
42
+ </Grid>
37
43
  {buttons && buttons.length > 0 && (
38
44
  <Grid item container width="auto">
39
45
  {buttons?.map((buttonProps) => (
40
- <Grid item marginLeft={2} component={Button} {...buttonProps} size="large" height="100%" />
46
+ <Grid item marginLeft={2} height="100%">
47
+ <Button {...buttonProps} size="large" color="secondary" />
48
+ </Grid>
41
49
  ))}
42
50
  </Grid>
43
51
  )}