@croquiscom/pds 11.7.1 → 11.8.0
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/CHANGELOG.md +6 -0
- package/dist/components/file-upload/ImageUploadPreview.stories.d.ts +1 -1
- package/dist/components/image/ImagePreview.d.ts +23 -0
- package/dist/components/image/ImagePreview.figma.d.ts +1 -0
- package/dist/components/image/ImagePreview.stories.d.ts +9 -0
- package/dist/components/image/index.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.es.js +4 -4
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,5 +6,5 @@ type Story = StoryObj<typeof ImageUploadPreview>;
|
|
|
6
6
|
export declare const Base: Story;
|
|
7
7
|
export declare const ReadOnly: Story;
|
|
8
8
|
export declare const Disabled: Story;
|
|
9
|
-
export declare const Loading: Story;
|
|
10
9
|
export declare const Error: Story;
|
|
10
|
+
export declare const OnloadError: Story;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ImagePreviewProps {
|
|
3
|
+
src?: string;
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
alt?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
objectFit: 'contain' | 'cover' | 'fill';
|
|
9
|
+
/** @default medium */
|
|
10
|
+
size?: 'medium' | 'small';
|
|
11
|
+
error?: boolean;
|
|
12
|
+
onClick?: (image_url: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const getImagePreviewSize: ({ size, width, height }: Pick<ImagePreviewProps, 'size' | 'width' | 'height'>) => string;
|
|
15
|
+
export declare const ImagePreview: React.ForwardRefExoticComponent<ImagePreviewProps & React.RefAttributes<HTMLImageElement>>;
|
|
16
|
+
export declare const ImagePreviewContainer: import("@emotion/styled").StyledComponent<{
|
|
17
|
+
theme?: import("@emotion/react").Theme;
|
|
18
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements>;
|
|
19
|
+
} & {
|
|
20
|
+
size: 'medium' | 'small';
|
|
21
|
+
width?: number;
|
|
22
|
+
height: number;
|
|
23
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ImagePreview } from './ImagePreview';
|
|
3
|
+
declare const meta: Meta<typeof ImagePreview>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ImagePreview>;
|
|
6
|
+
export declare const Base: Story;
|
|
7
|
+
export declare const Size: Story;
|
|
8
|
+
export declare const WithLabel: Story;
|
|
9
|
+
export declare const OnloadError: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ImagePreview';
|