1 | import * as React from 'react';
|
2 | import { DistributiveOmit } from '@mui/types';
|
3 | import { SxProps } from '@mui/system';
|
4 | import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
5 | import { Theme } from '../styles';
|
6 | import { TypographyOwnProps } from '../Typography';
|
7 | import { LinkClasses } from './linkClasses';
|
8 |
|
9 | export interface LinkOwnProps extends DistributiveOmit<LinkBaseProps, 'classes'> {
|
10 | |
11 |
|
12 |
|
13 | children?: React.ReactNode;
|
14 | |
15 |
|
16 |
|
17 | classes?: Partial<LinkClasses>;
|
18 | |
19 |
|
20 |
|
21 |
|
22 | color?: TypographyOwnProps['color'];
|
23 | |
24 |
|
25 |
|
26 | sx?: SxProps<Theme>;
|
27 | |
28 |
|
29 |
|
30 | TypographyClasses?: TypographyOwnProps['classes'];
|
31 | |
32 |
|
33 |
|
34 |
|
35 | underline?: 'none' | 'hover' | 'always';
|
36 | |
37 |
|
38 |
|
39 |
|
40 | variant?: TypographyOwnProps['variant'];
|
41 | }
|
42 |
|
43 | export interface LinkTypeMap<AdditionalProps = {}, RootComponent extends React.ElementType = 'a'> {
|
44 | props: AdditionalProps & LinkOwnProps;
|
45 | defaultComponent: RootComponent;
|
46 | }
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 | declare const Link: OverridableComponent<LinkTypeMap>;
|
61 |
|
62 | export type LinkBaseProps = DistributiveOmit<
|
63 | TypographyOwnProps,
|
64 | 'children' | 'color' | 'variant' | 'classes'
|
65 | >;
|
66 |
|
67 | export type LinkProps<
|
68 | RootComponent extends React.ElementType = LinkTypeMap['defaultComponent'],
|
69 | AdditionalProps = {},
|
70 | > = OverrideProps<LinkTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
71 | component?: React.ElementType;
|
72 | };
|
73 |
|
74 | export default Link;
|