@max-ts/components 1.2.0 → 1.2.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.
- package/lib/components/DataGrid/constants.d.ts +1 -1
- package/lib/components/Link/Link.d.ts +5 -13
- package/lib/index.mjs +341 -335
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LinkProps as MuiLinkProps } from '@mui/material';
|
|
2
|
+
import { ComponentPropsWithRef, ElementType } from 'react';
|
|
2
3
|
import { WithoutEmotionSpecific } from '../types';
|
|
3
|
-
export type LinkProps = Pick<WithoutEmotionSpecific<MuiLinkProps>, 'rel' | 'href' | 'className' | 'classes' | 'style' | 'children' | 'key' | 'target'> & {
|
|
4
|
+
export type LinkProps<TComponent extends ElementType = 'a'> = Pick<WithoutEmotionSpecific<MuiLinkProps>, 'rel' | 'href' | 'className' | 'classes' | 'style' | 'children' | 'key' | 'target'> & {
|
|
4
5
|
/**
|
|
5
6
|
* Добавление иконки
|
|
6
7
|
*/
|
|
@@ -10,15 +11,6 @@ export type LinkProps = Pick<WithoutEmotionSpecific<MuiLinkProps>, 'rel' | 'href
|
|
|
10
11
|
* добавляет атрибут 'download' тегу 'a'
|
|
11
12
|
*/
|
|
12
13
|
isDownload?: boolean;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* Добавление иконки
|
|
17
|
-
*/
|
|
18
|
-
withAdornment?: "start" | "end";
|
|
19
|
-
/**
|
|
20
|
-
* Указывает что ссылка для скачивания файла
|
|
21
|
-
* добавляет атрибут 'download' тегу 'a'
|
|
22
|
-
*/
|
|
23
|
-
isDownload?: boolean;
|
|
24
|
-
} & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
14
|
+
component?: TComponent;
|
|
15
|
+
} & ComponentPropsWithRef<TComponent>;
|
|
16
|
+
export declare const Link: <TComponent extends ElementType = "a">({ withAdornment, isDownload, children, ...props }: LinkProps<TComponent>) => import("react/jsx-runtime").JSX.Element;
|