@a-type/ui 6.0.44 → 6.0.45
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.
|
@@ -4,4 +4,4 @@ export interface ImgProps extends ComponentProps<'img'> {
|
|
|
4
4
|
fit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
|
|
5
5
|
position?: 'top' | 'bottom' | 'left' | 'right' | 'center';
|
|
6
6
|
}
|
|
7
|
-
export declare function Img({ full, fit, position, ...props }: ImgProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function Img({ full, fit, position, className, ...props }: ImgProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,8 +10,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import clsx from 'clsx';
|
|
14
|
+
import cls from './Img.module.css';
|
|
13
15
|
export function Img(_a) {
|
|
14
|
-
var { full, fit, position } = _a, props = __rest(_a, ["full", "fit", "position"]);
|
|
15
|
-
return (_jsx("img", Object.assign({ "data-full": full, "data-fit": fit, "data-position": position }, props)));
|
|
16
|
+
var { full, fit, position, className } = _a, props = __rest(_a, ["full", "fit", "position", "className"]);
|
|
17
|
+
return (_jsx("img", Object.assign({ className: clsx(cls.root, className), "data-full": full, "data-fit": fit, "data-position": position }, props)));
|
|
16
18
|
}
|
|
17
19
|
//# sourceMappingURL=Img.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Img.js","sourceRoot":"","sources":["../../../src/components/img/Img.tsx"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Img.js","sourceRoot":"","sources":["../../../src/components/img/Img.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,GAAG,MAAM,kBAAkB,CAAC;AAQnC,MAAM,UAAU,GAAG,CAAC,EAAsD;QAAtD,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,OAAsB,EAAjB,KAAK,cAA1C,wCAA4C,CAAF;IAC7D,OAAO,CACN,4BACC,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,eACzB,IAAI,cACL,GAAG,mBACE,QAAQ,IACnB,KAAK,EACR,CACF,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
1
2
|
import { ComponentProps } from 'react';
|
|
3
|
+
import cls from './Img.module.css';
|
|
2
4
|
|
|
3
5
|
export interface ImgProps extends ComponentProps<'img'> {
|
|
4
6
|
full?: 'width' | 'height' | boolean;
|
|
@@ -6,8 +8,14 @@ export interface ImgProps extends ComponentProps<'img'> {
|
|
|
6
8
|
position?: 'top' | 'bottom' | 'left' | 'right' | 'center';
|
|
7
9
|
}
|
|
8
10
|
|
|
9
|
-
export function Img({ full, fit, position, ...props }: ImgProps) {
|
|
11
|
+
export function Img({ full, fit, position, className, ...props }: ImgProps) {
|
|
10
12
|
return (
|
|
11
|
-
<img
|
|
13
|
+
<img
|
|
14
|
+
className={clsx(cls.root, className)}
|
|
15
|
+
data-full={full}
|
|
16
|
+
data-fit={fit}
|
|
17
|
+
data-position={position}
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
12
20
|
);
|
|
13
21
|
}
|