@ovotech/element-native 5.2.1-canary-b9d3078-402 → 5.2.1-canary-e6d6074-403

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.
Files changed (25) hide show
  1. package/dist/components/Cards/AccountCard/AccountCard.d.ts +11 -0
  2. package/dist/components/Cards/AccountCard/AccountCard.js +15 -0
  3. package/dist/components/Cards/AccountCard/AccountCard.styles.d.ts +5168 -0
  4. package/dist/components/Cards/AccountCard/AccountCard.styles.js +60 -0
  5. package/dist/components/Cards/AccountCard/index.d.ts +1 -0
  6. package/dist/components/Cards/AccountCard/index.js +1 -0
  7. package/dist/components/Cards/BalanceCard/BalanceCard.d.ts +15 -0
  8. package/dist/components/Cards/BalanceCard/BalanceCard.js +26 -0
  9. package/dist/components/Cards/BalanceCard/BalanceCard.styles.d.ts +3447 -0
  10. package/dist/components/Cards/BalanceCard/BalanceCard.styles.js +50 -0
  11. package/dist/components/Cards/BalanceCard/index.d.ts +1 -0
  12. package/dist/components/Cards/BalanceCard/index.js +1 -0
  13. package/dist/components/Cards/index.d.ts +2 -0
  14. package/dist/components/Cards/index.js +2 -0
  15. package/dist/components/index.d.ts +1 -0
  16. package/dist/components/index.js +1 -0
  17. package/dist/esm/components/Cards/AccountCard/AccountCard.js +15 -0
  18. package/dist/esm/components/Cards/AccountCard/AccountCard.styles.js +60 -0
  19. package/dist/esm/components/Cards/AccountCard/index.js +1 -0
  20. package/dist/esm/components/Cards/BalanceCard/BalanceCard.js +26 -0
  21. package/dist/esm/components/Cards/BalanceCard/BalanceCard.styles.js +50 -0
  22. package/dist/esm/components/Cards/BalanceCard/index.js +1 -0
  23. package/dist/esm/components/Cards/index.js +2 -0
  24. package/dist/esm/components/index.js +1 -0
  25. package/package.json +2 -2
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { ImageSourcePropType } from 'react-native';
3
+ export type Props = {
4
+ isBeyond?: boolean;
5
+ avatar?: ImageSourcePropType;
6
+ onSwitch?: () => void;
7
+ title: string;
8
+ accNumber: string | number;
9
+ bodyText?: string;
10
+ };
11
+ export declare const AccountCard: React.FC<Props>;
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useContext } from 'react';
3
+ import { Button, P, Strong } from '../..';
4
+ import { ThemeContext } from '../../../styled.native';
5
+ import { Avatar, Body, BodyContent, ButtonContainer, CardContent, CardWithAccount, TextContent, Title, TitleContent, } from './AccountCard.styles';
6
+ //@ts-ignore
7
+ import AccountImage from './account-card-image.jpg';
8
+ const Beyond = () => {
9
+ const theme = useContext(ThemeContext);
10
+ return _jsx(P, { style: { color: theme.color.brand.bold }, children: "Beyond" });
11
+ };
12
+ export const AccountCard = ({ isBeyond, avatar, onSwitch, title, accNumber, bodyText, }) => {
13
+ const theme = useContext(ThemeContext);
14
+ return (_jsx(CardWithAccount, { background: isBeyond ? theme.color.brand.dim : theme.color.brand.brand, children: _jsxs(CardContent, { children: [_jsx(Avatar, { source: avatar ? avatar : AccountImage, resizeMode: "cover", accessibilityIgnoresInvertColors: true, accessibilityLabel: 'Account Card Image' }), _jsxs(TextContent, { children: [_jsx(TitleContent, { children: _jsxs(Title, { children: [_jsx(Strong, { children: title }), " ", isBeyond && _jsx(Beyond, {})] }) }), _jsxs(BodyContent, { children: [_jsxs(Body, { children: ["Account Number: ", accNumber] }), _jsx(Body, { isBeyond: isBeyond, children: bodyText })] })] }), _jsx(ButtonContainer, { children: onSwitch && (_jsx(Button, { size: "small", inverted: isBeyond, iconRight: "switch", onPress: onSwitch })) })] }) }));
15
+ };