@atlaskit/media-card 77.11.3 → 77.12.1

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 (93) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/card/card.js +5 -5
  3. package/dist/cjs/card/cardView.js +6 -10
  4. package/dist/cjs/card/inlinePlayerWrapperStyles.js +1 -1
  5. package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
  6. package/dist/cjs/card/ui/styles.js +1 -12
  7. package/dist/cjs/card/ui/wrapper/imageContainer.js +52 -0
  8. package/dist/cjs/card/ui/wrapper/index.js +8 -1
  9. package/dist/cjs/card/ui/wrapper/styles.js +1 -1
  10. package/dist/cjs/card/v2/cardV2.js +1 -1
  11. package/dist/cjs/card/v2/cardViewV2.js +12 -17
  12. package/dist/cjs/card/v2/cardviews/cardViewWrapper.js +5 -9
  13. package/dist/cjs/card/v2/fileCard.js +66 -20
  14. package/dist/cjs/card/v2/svgView/helpers.js +16 -0
  15. package/dist/cjs/card/v2/svgView/index.js +12 -0
  16. package/dist/cjs/card/v2/svgView/svgView.js +134 -0
  17. package/dist/cjs/inline/loader.js +1 -1
  18. package/dist/cjs/inline/mediaInlineAnalyticsErrorBoundary.js +11 -11
  19. package/dist/cjs/utils/ufoExperiences.js +1 -1
  20. package/dist/es2019/card/card.js +5 -5
  21. package/dist/es2019/card/cardView.js +8 -12
  22. package/dist/es2019/card/inlinePlayerWrapperStyles.js +12 -12
  23. package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
  24. package/dist/es2019/card/ui/styles.js +0 -11
  25. package/dist/es2019/card/ui/wrapper/imageContainer.js +44 -0
  26. package/dist/es2019/card/ui/wrapper/index.js +2 -1
  27. package/dist/es2019/card/ui/wrapper/styles.js +21 -21
  28. package/dist/es2019/card/v2/cardV2.js +1 -1
  29. package/dist/es2019/card/v2/cardViewV2.js +13 -18
  30. package/dist/es2019/card/v2/cardviews/cardViewWrapper.js +6 -10
  31. package/dist/es2019/card/v2/fileCard.js +51 -8
  32. package/dist/es2019/card/v2/svgView/helpers.js +12 -0
  33. package/dist/es2019/card/v2/svgView/index.js +1 -0
  34. package/dist/es2019/card/v2/svgView/svgView.js +113 -0
  35. package/dist/es2019/inline/loader.js +1 -1
  36. package/dist/es2019/inline/mediaInlineAnalyticsErrorBoundary.js +11 -11
  37. package/dist/es2019/utils/ufoExperiences.js +1 -1
  38. package/dist/esm/card/card.js +5 -5
  39. package/dist/esm/card/cardView.js +8 -12
  40. package/dist/esm/card/inlinePlayerWrapperStyles.js +1 -1
  41. package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
  42. package/dist/esm/card/ui/styles.js +0 -11
  43. package/dist/esm/card/ui/wrapper/imageContainer.js +45 -0
  44. package/dist/esm/card/ui/wrapper/index.js +2 -1
  45. package/dist/esm/card/ui/wrapper/styles.js +1 -1
  46. package/dist/esm/card/v2/cardV2.js +1 -1
  47. package/dist/esm/card/v2/cardViewV2.js +13 -18
  48. package/dist/esm/card/v2/cardviews/cardViewWrapper.js +6 -10
  49. package/dist/esm/card/v2/fileCard.js +66 -20
  50. package/dist/esm/card/v2/svgView/helpers.js +10 -0
  51. package/dist/esm/card/v2/svgView/index.js +1 -0
  52. package/dist/esm/card/v2/svgView/svgView.js +123 -0
  53. package/dist/esm/inline/loader.js +1 -1
  54. package/dist/esm/inline/mediaInlineAnalyticsErrorBoundary.js +11 -11
  55. package/dist/esm/utils/ufoExperiences.js +1 -1
  56. package/dist/types/card/ui/iconWrapper/styles.d.ts +1 -1
  57. package/dist/types/card/ui/styles.d.ts +0 -1
  58. package/dist/types/card/ui/titleBox/styles.d.ts +1 -1
  59. package/dist/types/card/ui/wrapper/imageContainer.d.ts +15 -0
  60. package/dist/types/card/ui/wrapper/index.d.ts +1 -0
  61. package/dist/types/card/v2/svgView/helpers.d.ts +3 -0
  62. package/dist/types/card/v2/svgView/index.d.ts +1 -0
  63. package/dist/types/card/v2/svgView/svgView.d.ts +31 -0
  64. package/dist/types/utils/preventClickThrough.d.ts +1 -1
  65. package/dist/types/utils/viewportDetector.d.ts +1 -1
  66. package/dist/types-ts4.5/card/ui/iconWrapper/styles.d.ts +1 -1
  67. package/dist/types-ts4.5/card/ui/styles.d.ts +0 -1
  68. package/dist/types-ts4.5/card/ui/titleBox/styles.d.ts +1 -1
  69. package/dist/types-ts4.5/card/ui/wrapper/imageContainer.d.ts +15 -0
  70. package/dist/types-ts4.5/card/ui/wrapper/index.d.ts +1 -0
  71. package/dist/types-ts4.5/card/v2/svgView/helpers.d.ts +3 -0
  72. package/dist/types-ts4.5/card/v2/svgView/index.d.ts +1 -0
  73. package/dist/types-ts4.5/card/v2/svgView/svgView.d.ts +31 -0
  74. package/dist/types-ts4.5/utils/preventClickThrough.d.ts +1 -1
  75. package/dist/types-ts4.5/utils/viewportDetector.d.ts +1 -1
  76. package/example-helpers/DelayedRender.tsx +19 -19
  77. package/example-helpers/cardViewWrapper.tsx +18 -22
  78. package/example-helpers/cards.tsx +268 -331
  79. package/example-helpers/developmentUseMessage.tsx +8 -9
  80. package/example-helpers/index.tsx +100 -124
  81. package/example-helpers/selectableCard.tsx +32 -35
  82. package/example-helpers/ssrHelpers.tsx +19 -29
  83. package/example-helpers/styles.ts +73 -73
  84. package/example-helpers/svg-helpers/cardContainer.tsx +24 -0
  85. package/example-helpers/svg-helpers/controls.tsx +21 -0
  86. package/example-helpers/svg-helpers/delayApiResponses.ts +31 -0
  87. package/example-helpers/svg-helpers/dimensionPicker.tsx +116 -0
  88. package/example-helpers/svg-helpers/index.ts +7 -0
  89. package/example-helpers/svg-helpers/svgContainer.tsx +32 -0
  90. package/example-helpers/svg-helpers/toggle.tsx +42 -0
  91. package/example-helpers/svg-helpers/uploader.ts +44 -0
  92. package/package.json +13 -5
  93. package/report.api.md +227 -232
@@ -26,17 +26,17 @@ var ErrorBoundaryComponent = function ErrorBoundaryComponent(_ref) {
26
26
  };
27
27
 
28
28
  /* Note:
29
- - styling is borrowed from packages/media/media-ui/src/MediaInlineCard/Frame/styled.ts
30
- - because we are not using styled components, we are not able to use themed(), here is the "themed" property of color and backgroundColor
31
- color: `${themed({
32
- light: token('color.text', N900),
33
- dark: token('color.text', DN600),
34
- })}`,
35
- backgroundColor: `${themed({
36
- light: token('color.background.neutral', N30A),
37
- dark: token('color.background.neutral', DN80),
38
- })}`,
39
- */
29
+ - styling is borrowed from packages/media/media-ui/src/MediaInlineCard/Frame/styled.ts
30
+ - because we are not using styled components, we are not able to use themed(), here is the "themed" property of color and backgroundColor
31
+ color: `${themed({
32
+ light: token('color.text', N900),
33
+ dark: token('color.text', DN600),
34
+ })}`,
35
+ backgroundColor: `${themed({
36
+ light: token('color.background.neutral', N30A),
37
+ dark: token('color.background.neutral', DN80),
38
+ })}`,
39
+ */
40
40
 
41
41
  var style = _objectSpread({
42
42
  lineHeight: '16px',
@@ -7,7 +7,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
7
7
  import { MediaCardError } from '../errors';
8
8
  import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
9
9
  var packageName = "@atlaskit/media-card";
10
- var packageVersion = "77.11.3";
10
+ var packageVersion = "77.12.1";
11
11
  var concurrentExperience;
12
12
  var getExperience = function getExperience(id) {
13
13
  if (!concurrentExperience) {
@@ -2,6 +2,6 @@ import { type Breakpoint } from '../common';
2
2
  import { type IconWrapperProps } from './types';
3
3
  export declare function titleBoxHeight(hasTitleBox: boolean, breakpoint: Breakpoint): string;
4
4
  export declare const iconWrapperStyles: {
5
- ({ hasTitleBox, breakpoint, }: IconWrapperProps): import("@emotion/react").SerializedStyles;
5
+ ({ hasTitleBox, breakpoint }: IconWrapperProps): import("@emotion/react").SerializedStyles;
6
6
  displayName: string;
7
7
  };
@@ -8,6 +8,5 @@ export declare const getWrapperShadow: (disableOverlay: boolean, selected: boole
8
8
  export declare const getCursorStyle: (cursor: MediaCardCursor | undefined) => string;
9
9
  export declare const getClickablePlayButtonStyles: (isPlayButtonClickable: boolean) => "" | "\n &:hover .media-card-play-button {\n \n .play-icon-background {\n width: 56px;\n height: 56px;\n }\n\n }\n ";
10
10
  export declare const getSelectableTickBoxStyles: (isTickBoxSelectable: boolean) => string;
11
- export declare const cardImageContainerStyles: import("@emotion/react").SerializedStyles;
12
11
  export declare const transition: (propertyName?: string) => string;
13
12
  export declare const rgba: (hex: any, opacity: any) => string;
@@ -1,6 +1,6 @@
1
1
  import { type TitleBoxFooterProps, type TitleBoxHeaderProps, type TitleBoxWrapperProps } from './types';
2
2
  export declare const titleBoxWrapperStyles: {
3
- ({ breakpoint, titleBoxBgColor, }: TitleBoxWrapperProps): import("@emotion/react").SerializedStyles;
3
+ ({ breakpoint, titleBoxBgColor }: TitleBoxWrapperProps): import("@emotion/react").SerializedStyles;
4
4
  displayName: string;
5
5
  };
6
6
  export declare const titleBoxHeaderStyles: {
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ /** @jsx jsx */
3
+ import { jsx } from '@emotion/react';
4
+ type ImageContainerProps = {
5
+ children: React.ReactNode;
6
+ centerElements?: boolean;
7
+ testId: string;
8
+ mediaName?: string;
9
+ status?: string;
10
+ progress?: number;
11
+ selected?: boolean;
12
+ source?: string;
13
+ };
14
+ export declare const ImageContainer: ({ children, testId, mediaName, status, progress, selected, source, centerElements, }: ImageContainerProps) => jsx.JSX.Element;
15
+ export {};
@@ -1 +1,2 @@
1
1
  export { Wrapper } from './wrapper';
2
+ export { ImageContainer } from './imageContainer';
@@ -0,0 +1,3 @@
1
+ import { type ImageResizeMode } from '@atlaskit/media-client';
2
+ import { type MediaSvgProps } from '@atlaskit/media-svg';
3
+ export declare const calculateSvgDimensions: (img: HTMLImageElement, resizeMode?: ImageResizeMode) => MediaSvgProps['dimensions'];
@@ -0,0 +1 @@
1
+ export { SvgView } from './svgView';
@@ -0,0 +1,31 @@
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ import React, { type MouseEvent } from 'react';
4
+ import { type FileIdentifier, type ImageResizeMode } from '@atlaskit/media-client';
5
+ import { type WithAnalyticsEventsProps, type UIAnalyticsEvent } from '@atlaskit/analytics-next';
6
+ import { type CardStatus, type MediaCardCursor, type CardDimensions } from '../../../types';
7
+ import { type MediaFilePreview } from '@atlaskit/media-file-preview';
8
+ export declare const convertResizeMode: (resizeMode?: ImageResizeMode) => React.CSSProperties['objectFit'];
9
+ export type OnClickFn = (event: React.MouseEvent<HTMLDivElement | HTMLButtonElement>, analyticsEvent?: UIAnalyticsEvent) => void;
10
+ export interface SvgViewBaseOwnProps {
11
+ readonly testId?: string;
12
+ identifier: FileIdentifier;
13
+ readonly status: CardStatus;
14
+ readonly dimensions: CardDimensions;
15
+ readonly onClick?: OnClickFn;
16
+ readonly onMouseEnter?: (event: MouseEvent<HTMLDivElement>) => void;
17
+ readonly selected?: boolean;
18
+ readonly fileName?: string;
19
+ readonly cardPreview?: MediaFilePreview;
20
+ readonly mediaCardCursor?: MediaCardCursor;
21
+ readonly progress?: number;
22
+ readonly alt?: string;
23
+ readonly resizeMode?: ImageResizeMode;
24
+ readonly onImageLoad?: (cardPreview: MediaFilePreview) => void;
25
+ readonly onImageError?: (cardPreview: MediaFilePreview) => void;
26
+ readonly shouldOpenMediaViewer?: boolean;
27
+ readonly openMediaViewerButtonRef?: React.Ref<HTMLButtonElement>;
28
+ }
29
+ export type SvgViewProps = SvgViewBaseOwnProps & WithAnalyticsEventsProps;
30
+ export declare const SvgViewBase: ({ identifier, dimensions, onClick, onMouseEnter, testId, status, selected, fileName, cardPreview, mediaCardCursor, progress, alt, resizeMode, shouldOpenMediaViewer, openMediaViewerButtonRef, }: SvgViewProps) => jsx.JSX.Element;
31
+ export declare const SvgView: React.ForwardRefExoticComponent<Omit<SvgViewBaseOwnProps & WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
@@ -3,6 +3,6 @@ import { type ReactNode } from 'react';
3
3
  export type PreventClickThroughProps = {
4
4
  readonly children?: ReactNode;
5
5
  };
6
- export declare function PreventClickThrough({ children, }: PreventClickThroughProps): JSX.Element;
6
+ export declare function PreventClickThrough({ children }: PreventClickThroughProps): JSX.Element;
7
7
  export type CreatePreventClickThrough = <T>(onClick: () => void) => (event: React.MouseEvent<T, MouseEvent>) => void;
8
8
  export declare const createPreventClickThrough: CreatePreventClickThrough;
@@ -3,4 +3,4 @@ export type ViewportDetectorProps = PropsWithChildren<{
3
3
  cardEl: HTMLElement | null;
4
4
  onVisible: () => void;
5
5
  }>;
6
- export declare const ViewportDetector: ({ cardEl, onVisible, children, }: ViewportDetectorProps) => JSX.Element;
6
+ export declare const ViewportDetector: ({ cardEl, onVisible, children }: ViewportDetectorProps) => JSX.Element;
@@ -2,6 +2,6 @@ import { type Breakpoint } from '../common';
2
2
  import { type IconWrapperProps } from './types';
3
3
  export declare function titleBoxHeight(hasTitleBox: boolean, breakpoint: Breakpoint): string;
4
4
  export declare const iconWrapperStyles: {
5
- ({ hasTitleBox, breakpoint, }: IconWrapperProps): import("@emotion/react").SerializedStyles;
5
+ ({ hasTitleBox, breakpoint }: IconWrapperProps): import("@emotion/react").SerializedStyles;
6
6
  displayName: string;
7
7
  };
@@ -8,6 +8,5 @@ export declare const getWrapperShadow: (disableOverlay: boolean, selected: boole
8
8
  export declare const getCursorStyle: (cursor: MediaCardCursor | undefined) => string;
9
9
  export declare const getClickablePlayButtonStyles: (isPlayButtonClickable: boolean) => "" | "\n &:hover .media-card-play-button {\n \n .play-icon-background {\n width: 56px;\n height: 56px;\n }\n\n }\n ";
10
10
  export declare const getSelectableTickBoxStyles: (isTickBoxSelectable: boolean) => string;
11
- export declare const cardImageContainerStyles: import("@emotion/react").SerializedStyles;
12
11
  export declare const transition: (propertyName?: string) => string;
13
12
  export declare const rgba: (hex: any, opacity: any) => string;
@@ -1,6 +1,6 @@
1
1
  import { type TitleBoxFooterProps, type TitleBoxHeaderProps, type TitleBoxWrapperProps } from './types';
2
2
  export declare const titleBoxWrapperStyles: {
3
- ({ breakpoint, titleBoxBgColor, }: TitleBoxWrapperProps): import("@emotion/react").SerializedStyles;
3
+ ({ breakpoint, titleBoxBgColor }: TitleBoxWrapperProps): import("@emotion/react").SerializedStyles;
4
4
  displayName: string;
5
5
  };
6
6
  export declare const titleBoxHeaderStyles: {
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ /** @jsx jsx */
3
+ import { jsx } from '@emotion/react';
4
+ type ImageContainerProps = {
5
+ children: React.ReactNode;
6
+ centerElements?: boolean;
7
+ testId: string;
8
+ mediaName?: string;
9
+ status?: string;
10
+ progress?: number;
11
+ selected?: boolean;
12
+ source?: string;
13
+ };
14
+ export declare const ImageContainer: ({ children, testId, mediaName, status, progress, selected, source, centerElements, }: ImageContainerProps) => jsx.JSX.Element;
15
+ export {};
@@ -1 +1,2 @@
1
1
  export { Wrapper } from './wrapper';
2
+ export { ImageContainer } from './imageContainer';
@@ -0,0 +1,3 @@
1
+ import { type ImageResizeMode } from '@atlaskit/media-client';
2
+ import { type MediaSvgProps } from '@atlaskit/media-svg';
3
+ export declare const calculateSvgDimensions: (img: HTMLImageElement, resizeMode?: ImageResizeMode) => MediaSvgProps['dimensions'];
@@ -0,0 +1 @@
1
+ export { SvgView } from './svgView';
@@ -0,0 +1,31 @@
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ import React, { type MouseEvent } from 'react';
4
+ import { type FileIdentifier, type ImageResizeMode } from '@atlaskit/media-client';
5
+ import { type WithAnalyticsEventsProps, type UIAnalyticsEvent } from '@atlaskit/analytics-next';
6
+ import { type CardStatus, type MediaCardCursor, type CardDimensions } from '../../../types';
7
+ import { type MediaFilePreview } from '@atlaskit/media-file-preview';
8
+ export declare const convertResizeMode: (resizeMode?: ImageResizeMode) => React.CSSProperties['objectFit'];
9
+ export type OnClickFn = (event: React.MouseEvent<HTMLDivElement | HTMLButtonElement>, analyticsEvent?: UIAnalyticsEvent) => void;
10
+ export interface SvgViewBaseOwnProps {
11
+ readonly testId?: string;
12
+ identifier: FileIdentifier;
13
+ readonly status: CardStatus;
14
+ readonly dimensions: CardDimensions;
15
+ readonly onClick?: OnClickFn;
16
+ readonly onMouseEnter?: (event: MouseEvent<HTMLDivElement>) => void;
17
+ readonly selected?: boolean;
18
+ readonly fileName?: string;
19
+ readonly cardPreview?: MediaFilePreview;
20
+ readonly mediaCardCursor?: MediaCardCursor;
21
+ readonly progress?: number;
22
+ readonly alt?: string;
23
+ readonly resizeMode?: ImageResizeMode;
24
+ readonly onImageLoad?: (cardPreview: MediaFilePreview) => void;
25
+ readonly onImageError?: (cardPreview: MediaFilePreview) => void;
26
+ readonly shouldOpenMediaViewer?: boolean;
27
+ readonly openMediaViewerButtonRef?: React.Ref<HTMLButtonElement>;
28
+ }
29
+ export type SvgViewProps = SvgViewBaseOwnProps & WithAnalyticsEventsProps;
30
+ export declare const SvgViewBase: ({ identifier, dimensions, onClick, onMouseEnter, testId, status, selected, fileName, cardPreview, mediaCardCursor, progress, alt, resizeMode, shouldOpenMediaViewer, openMediaViewerButtonRef, }: SvgViewProps) => jsx.JSX.Element;
31
+ export declare const SvgView: React.ForwardRefExoticComponent<Omit<SvgViewBaseOwnProps & WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
@@ -3,6 +3,6 @@ import { type ReactNode } from 'react';
3
3
  export type PreventClickThroughProps = {
4
4
  readonly children?: ReactNode;
5
5
  };
6
- export declare function PreventClickThrough({ children, }: PreventClickThroughProps): JSX.Element;
6
+ export declare function PreventClickThrough({ children }: PreventClickThroughProps): JSX.Element;
7
7
  export type CreatePreventClickThrough = <T>(onClick: () => void) => (event: React.MouseEvent<T, MouseEvent>) => void;
8
8
  export declare const createPreventClickThrough: CreatePreventClickThrough;
@@ -3,4 +3,4 @@ export type ViewportDetectorProps = PropsWithChildren<{
3
3
  cardEl: HTMLElement | null;
4
4
  onVisible: () => void;
5
5
  }>;
6
- export declare const ViewportDetector: ({ cardEl, onVisible, children, }: ViewportDetectorProps) => JSX.Element;
6
+ export declare const ViewportDetector: ({ cardEl, onVisible, children }: ViewportDetectorProps) => JSX.Element;
@@ -1,31 +1,31 @@
1
1
  import React, { Component } from 'react';
2
2
 
3
3
  interface Props {
4
- timeout: number;
5
- component: React.ElementType;
6
- componentProps: { [key: string]: any };
4
+ timeout: number;
5
+ component: React.ElementType;
6
+ componentProps: { [key: string]: any };
7
7
  }
8
8
 
9
9
  interface State {
10
- hidden: boolean;
10
+ hidden: boolean;
11
11
  }
12
12
 
13
13
  export class DelayedRender extends Component<Props, State> {
14
- state: State = {
15
- hidden: true,
16
- };
14
+ state: State = {
15
+ hidden: true,
16
+ };
17
17
 
18
- componentDidMount() {
19
- window.setTimeout(() => {
20
- this.setState({ hidden: false });
21
- }, this.props.timeout);
22
- }
18
+ componentDidMount() {
19
+ window.setTimeout(() => {
20
+ this.setState({ hidden: false });
21
+ }, this.props.timeout);
22
+ }
23
23
 
24
- render() {
25
- if (this.state.hidden) {
26
- return null;
27
- }
28
- const { component: Component, componentProps } = this.props;
29
- return <Component {...componentProps} />;
30
- }
24
+ render() {
25
+ if (this.state.hidden) {
26
+ return null;
27
+ }
28
+ const { component: Component, componentProps } = this.props;
29
+ return <Component {...componentProps} />;
30
+ }
31
31
  }
@@ -3,42 +3,38 @@ import { jsx } from '@emotion/react';
3
3
  import { Box, xcss } from '@atlaskit/primitives';
4
4
 
5
5
  type CardViewWrapperProps = {
6
- small?: boolean;
7
- displayInline?: boolean;
8
- children?: JSX.Element;
6
+ small?: boolean;
7
+ displayInline?: boolean;
8
+ children?: JSX.Element;
9
9
  };
10
10
 
11
11
  const displayInlineStyles = (displayInline?: boolean) => {
12
- return displayInline ? 'inline-block;' : '';
12
+ return displayInline ? 'inline-block;' : '';
13
13
  };
14
14
 
15
15
  // Minimum supported dimensions
16
16
  const smallStyles = xcss({
17
- width: '156px',
18
- height: '108px',
17
+ width: '156px',
18
+ height: '108px',
19
19
  });
20
20
 
21
21
  // Maximum supported dimensions
22
22
  const largeStyles = xcss({
23
- width: '600px',
24
- height: '450px',
23
+ width: '600px',
24
+ height: '450px',
25
25
  });
26
26
 
27
27
  const cardWrapperStyles = ({ small, displayInline }: CardViewWrapperProps) =>
28
- xcss({
29
- display: displayInlineStyles(displayInline),
30
- marginBlock: 'space.200',
31
- marginInline: 'space.250',
32
- });
28
+ xcss({
29
+ display: displayInlineStyles(displayInline),
30
+ marginBlock: 'space.200',
31
+ marginInline: 'space.250',
32
+ });
33
33
 
34
34
  export const CardViewWrapper = (props: CardViewWrapperProps) => {
35
- if (props.small) {
36
- return (
37
- <Box xcss={[cardWrapperStyles(props), smallStyles]}>{props.children}</Box>
38
- );
39
- } else {
40
- return (
41
- <Box xcss={[cardWrapperStyles(props), largeStyles]}>{props.children}</Box>
42
- );
43
- }
35
+ if (props.small) {
36
+ return <Box xcss={[cardWrapperStyles(props), smallStyles]}>{props.children}</Box>;
37
+ } else {
38
+ return <Box xcss={[cardWrapperStyles(props), largeStyles]}>{props.children}</Box>;
39
+ }
44
40
  };