@sikka/hawa 0.0.62 → 0.0.63

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendors~main.e7c4fe25.iframe.bundle.js","sources":[],"mappings":";A","sourceRoot":""}
@@ -1,61 +0,0 @@
1
- import { Button, Container, Stack } from "@mui/material";
2
- import React from "react";
3
- import PropTypes from "prop-types";
4
- import { HawaPopMenu } from "../elements/HawaPopMenu";
5
- import MenuIcon from "@mui/icons-material/Menu";
6
-
7
- export const HawaPageControls = (props) => {
8
- const [anchorElUser, setAnchorElUser] = React.useState(null);
9
- const handleOpenUserMenu = (event) => setAnchorElUser(event.currentTarget);
10
-
11
- return (
12
- <Container
13
- variant="page-controls"
14
- {...props}
15
- // maxWidth="sm"
16
- style={{
17
- display: "flex",
18
- flexDirection: "row",
19
- justifyContent: "space-between"
20
- }}
21
- >
22
- <Button variant="layout" onClick={props.backAction}>
23
- {props.backText}
24
- </Button>
25
- <Stack
26
- direction="row"
27
- spacing={1}
28
- sx={{ display: { xs: "none", md: "flex" } }}
29
- >
30
- {props.actionButtons.map((d) => {
31
- return <Button variant="layout">{d.label}</Button>;
32
- })}
33
- </Stack>
34
- <Stack
35
- direction="row"
36
- spacing={1}
37
- sx={{ display: { xs: "flex", md: "none" } }}
38
- >
39
- <Button variant="layout" onClick={handleOpenUserMenu}>
40
- <MenuIcon />
41
- </Button>
42
- <HawaPopMenu
43
- handleClose={(e) => setAnchorElUser(null)}
44
- anchor={anchorElUser}
45
- menuItems={props.actionButtons}
46
- />
47
- </Stack>
48
- </Container>
49
- );
50
- };
51
-
52
- HawaPageControls.propTypes = {
53
- backText: PropTypes.string,
54
- backAction: PropTypes.func,
55
- actionButtons: PropTypes.arrayOf(
56
- PropTypes.shape({
57
- label: PropTypes.string,
58
- action: PropTypes.func
59
- })
60
- )
61
- };