Skip to content

Commit

Permalink
Add LogoRatio and LogoMarginRatio types
Browse files Browse the repository at this point in the history
  • Loading branch information
VickyStash committed Oct 19, 2023
1 parent a8739b1 commit a26508b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/QRCode/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import {ImageSourcePropType} from 'react-native';
import defaultTheme from '../../styles/themes/default';
import CONST from '../../CONST';

type LogoRatio = typeof CONST.QR.DEFAULT_LOGO_SIZE_RATIO | typeof CONST.QR.EXPENSIFY_LOGO_SIZE_RATIO;

type LogoMarginRatio = typeof CONST.QR.DEFAULT_LOGO_MARGIN_RATIO | typeof CONST.QR.EXPENSIFY_LOGO_MARGIN_RATIO;

type QRCodeProps = {
/** The QR code URL */
url: string;
Expand All @@ -15,10 +19,10 @@ type QRCodeProps = {
logo?: ImageSourcePropType;

/** The size ratio of logo to QR code */
logoRatio?: typeof CONST.QR.DEFAULT_LOGO_SIZE_RATIO | typeof CONST.QR.EXPENSIFY_LOGO_SIZE_RATIO;
logoRatio?: LogoRatio;

/** The size ratio of margin around logo to QR code */
logoMarginRatio?: typeof CONST.QR.DEFAULT_LOGO_MARGIN_RATIO | typeof CONST.QR.EXPENSIFY_LOGO_MARGIN_RATIO;
logoMarginRatio?: LogoMarginRatio;

/** The QRCode size */
size?: number;
Expand Down

0 comments on commit a26508b

Please sign in to comment.