@stigg/react-sdk 4.4.2 → 4.4.3
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/dist/components/checkout/promotionCode/AppliedPromotionCode.d.ts +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/react-sdk.cjs.development.js +23 -14
- package/dist/react-sdk.cjs.development.js.map +1 -1
- package/dist/react-sdk.cjs.production.min.js +1 -1
- package/dist/react-sdk.cjs.production.min.js.map +1 -1
- package/dist/react-sdk.esm.js +29 -15
- package/dist/react-sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/checkout/promotionCode/AppliedPromotionCode.tsx +14 -2
- package/src/index.ts +17 -1
package/package.json
CHANGED
|
@@ -16,6 +16,18 @@ const AppliedCouponContainer = styled(Grid)`
|
|
|
16
16
|
border: 1px solid ${({ theme }) => theme.stigg.palette.primary};
|
|
17
17
|
`;
|
|
18
18
|
|
|
19
|
+
export const StyledIcon = styled(Icon, { shouldForwardProp: (prop) => prop !== 'style' })<{ $shouldFill?: boolean }>`
|
|
20
|
+
display: flex;
|
|
21
|
+
|
|
22
|
+
g {
|
|
23
|
+
stroke: ${({ theme }) => theme.stigg.palette.primary};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
path {
|
|
27
|
+
fill: ${({ theme, $shouldFill }) => ($shouldFill ? theme.stigg.palette.primary : undefined)};
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
|
|
19
31
|
export type AppliedPromotionCodeProps = {
|
|
20
32
|
promotionCode: string;
|
|
21
33
|
onClearPromotionCode: () => void;
|
|
@@ -24,14 +36,14 @@ export type AppliedPromotionCodeProps = {
|
|
|
24
36
|
export const AppliedPromotionCode = ({ promotionCode, onClearPromotionCode }: AppliedPromotionCodeProps) => (
|
|
25
37
|
<AppliedCouponContainer container>
|
|
26
38
|
<Grid item display="flex" gap={1} alignItems="center">
|
|
27
|
-
<
|
|
39
|
+
<StyledIcon icon="Coupon" />
|
|
28
40
|
<Typography variant="body1" color="primary.main" lineHeight="auto">
|
|
29
41
|
{promotionCode}
|
|
30
42
|
</Typography>
|
|
31
43
|
</Grid>
|
|
32
44
|
<Grid item>
|
|
33
45
|
<Button variant="text" sx={{ minWidth: 'unset', padding: 0 }} onClick={onClearPromotionCode}>
|
|
34
|
-
<
|
|
46
|
+
<StyledIcon icon="Close" $shouldFill />
|
|
35
47
|
</Button>
|
|
36
48
|
</Grid>
|
|
37
49
|
</AppliedCouponContainer>
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import './styles.css';
|
|
2
|
+
|
|
2
3
|
export * from '@stigg/js-client-sdk';
|
|
3
4
|
export {
|
|
4
5
|
Paywall,
|
|
@@ -29,7 +30,22 @@ export {
|
|
|
29
30
|
StiggContextValue,
|
|
30
31
|
StiggContext,
|
|
31
32
|
} from './components/StiggProvider';
|
|
32
|
-
export {
|
|
33
|
+
export {
|
|
34
|
+
Checkout,
|
|
35
|
+
CheckoutProps,
|
|
36
|
+
CheckoutProviderProps,
|
|
37
|
+
CheckoutContainerProps,
|
|
38
|
+
CheckoutLocalization,
|
|
39
|
+
CheckoutResult,
|
|
40
|
+
OnCheckoutCompletedParams,
|
|
41
|
+
OnCheckoutParams,
|
|
42
|
+
CheckoutTheme,
|
|
43
|
+
CheckoutMockProps,
|
|
44
|
+
MockCheckoutPreviewCallback,
|
|
45
|
+
MockCheckoutStateCallback,
|
|
46
|
+
BillingInformation,
|
|
47
|
+
TaxDetailsInput,
|
|
48
|
+
} from './components/checkout';
|
|
33
49
|
export { useWaitForCheckoutCompleted, ProvisionStatus } from './components/hooks';
|
|
34
50
|
export { HorizontalAlignment, TextAlignment } from './theme/types';
|
|
35
51
|
export { CustomizedTheme as Theme } from './theme/Theme';
|