@xyo-network/react-shared 2.27.4 → 2.27.5

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.
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
- export interface TokenBarProps {
2
+ import { PaperProps } from '@mui/material';
3
+ export interface TokenBarProps extends PaperProps {
3
4
  text1?: string | number;
4
5
  text2?: string | number;
5
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TokenBar.d.ts","sourceRoot":"","sources":["../../../../src/components/TokenBar/TokenBar.tsx"],"names":[],"mappings":";AAEA,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACxB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAY5C,CAAA"}
1
+ {"version":3,"file":"TokenBar.d.ts","sourceRoot":"","sources":["../../../../src/components/TokenBar/TokenBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAS,UAAU,EAAc,MAAM,eAAe,CAAA;AAE7D,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACxB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAa5C,CAAA"}
@@ -1,8 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Typography, useTheme } from '@mui/material';
3
- import { FlexGrowRow } from '@xylabs/react-flexbox';
4
- export const TokenBar = ({ text1, text2 }) => {
5
- const theme = useTheme();
6
- return (_jsxs(FlexGrowRow, { width: "100%", paddingY: 1, paddingX: 2, bgcolor: theme.palette.background.paper, borderRadius: 1, justifyContent: "space-between", children: [_jsx(Typography, { variant: "body1", fontWeight: 300, children: text1 }), _jsx(Typography, { variant: "body1", fontWeight: 300, textTransform: "uppercase", color: "gray", paddingLeft: 2, children: text2 })] }));
2
+ import { Paper, Typography } from '@mui/material';
3
+ import { FlexRow } from '@xylabs/react-flexbox';
4
+ export const TokenBar = ({ text1, text2, ...props }) => {
5
+ return (_jsx(Paper, { elevation: 0, ...props, children: _jsxs(FlexRow, { justifyContent: "space-between", children: [_jsx(Typography, { variant: "body1", fontWeight: 300, margin: 1, children: text1 }), _jsx(Typography, { variant: "body1", fontWeight: 300, textTransform: "uppercase", color: "gray", margin: 1, children: text2 })] }) }));
7
6
  };
8
7
  //# sourceMappingURL=TokenBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TokenBar.js","sourceRoot":"","sources":["../../../../src/components/TokenBar/TokenBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAMnD,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IACpE,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAA;IACxB,OAAO,CACL,MAAC,WAAW,IAAC,KAAK,EAAC,MAAM,EAAC,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,cAAc,EAAC,eAAe,aAC1I,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,EAAC,UAAU,EAAE,GAAG,YACxC,KAAK,GACK,EACb,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,EAAC,UAAU,EAAE,GAAG,EAAE,aAAa,EAAC,WAAW,EAAC,KAAK,EAAC,MAAM,EAAC,WAAW,EAAE,CAAC,YAC/F,KAAK,GACK,IACD,CACf,CAAA;AACH,CAAC,CAAA"}
1
+ {"version":3,"file":"TokenBar.js","sourceRoot":"","sources":["../../../../src/components/TokenBar/TokenBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAc,UAAU,EAAE,MAAM,eAAe,CAAA;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAM/C,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC9E,OAAO,CACL,KAAC,KAAK,IAAC,SAAS,EAAE,CAAC,KAAM,KAAK,YAC5B,MAAC,OAAO,IAAC,cAAc,EAAC,eAAe,aACrC,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,EAAC,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,YACnD,KAAK,GACK,EACb,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,EAAC,UAAU,EAAE,GAAG,EAAE,aAAa,EAAC,WAAW,EAAC,KAAK,EAAC,MAAM,EAAC,MAAM,EAAE,CAAC,YAC1F,KAAK,GACK,IACL,GACJ,CACT,CAAA;AACH,CAAC,CAAA"}
package/package.json CHANGED
@@ -35,7 +35,7 @@
35
35
  "@xylabs/pixel": "^1.4.5",
36
36
  "@xylabs/tsconfig-dom": "^2.5.13",
37
37
  "@xyo-network/api": "^2.24.10",
38
- "@xyo-network/react-storybook": "^2.27.4"
38
+ "@xyo-network/react-storybook": "^2.27.5"
39
39
  },
40
40
  "browser": "dist/esm/index.js",
41
41
  "docs": "dist/docs.json",
@@ -86,5 +86,5 @@
86
86
  },
87
87
  "sideEffects": false,
88
88
  "types": "dist/esm/index.d.ts",
89
- "version": "2.27.4"
89
+ "version": "2.27.5"
90
90
  }
@@ -1,20 +1,21 @@
1
- import { Typography, useTheme } from '@mui/material'
2
- import { FlexGrowRow } from '@xylabs/react-flexbox'
3
- export interface TokenBarProps {
1
+ import { Paper, PaperProps, Typography } from '@mui/material'
2
+ import { FlexRow } from '@xylabs/react-flexbox'
3
+ export interface TokenBarProps extends PaperProps {
4
4
  text1?: string | number
5
5
  text2?: string | number
6
6
  }
7
7
 
8
- export const TokenBar: React.FC<TokenBarProps> = ({ text1, text2 }) => {
9
- const theme = useTheme()
8
+ export const TokenBar: React.FC<TokenBarProps> = ({ text1, text2, ...props }) => {
10
9
  return (
11
- <FlexGrowRow width="100%" paddingY={1} paddingX={2} bgcolor={theme.palette.background.paper} borderRadius={1} justifyContent="space-between">
12
- <Typography variant="body1" fontWeight={300}>
13
- {text1}
14
- </Typography>
15
- <Typography variant="body1" fontWeight={300} textTransform="uppercase" color="gray" paddingLeft={2}>
16
- {text2}
17
- </Typography>
18
- </FlexGrowRow>
10
+ <Paper elevation={0} {...props}>
11
+ <FlexRow justifyContent="space-between">
12
+ <Typography variant="body1" fontWeight={300} margin={1}>
13
+ {text1}
14
+ </Typography>
15
+ <Typography variant="body1" fontWeight={300} textTransform="uppercase" color="gray" margin={1}>
16
+ {text2}
17
+ </Typography>
18
+ </FlexRow>
19
+ </Paper>
19
20
  )
20
21
  }