-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
/
Link.d.ts
74 lines (68 loc) · 2.11 KB
/
Link.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import * as React from 'react';
import { DistributiveOmit } from '@mui/types';
import { SxProps } from '@mui/system';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
import { Theme } from '../styles';
import { TypographyOwnProps } from '../Typography';
import { LinkClasses } from './linkClasses';
export interface LinkOwnProps extends DistributiveOmit<LinkBaseProps, 'classes'> {
/**
* The content of the component.
*/
children?: React.ReactNode;
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<LinkClasses>;
/**
* The color of the link.
* @default 'primary'
*/
color?: TypographyOwnProps['color'];
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
/**
* `classes` prop applied to the [`Typography`](https://mui.com/material-ui/api/typography/) element.
*/
TypographyClasses?: TypographyOwnProps['classes'];
/**
* Controls when the link should have an underline.
* @default 'always'
*/
underline?: 'none' | 'hover' | 'always';
/**
* Applies the theme typography styles.
* @default 'inherit'
*/
variant?: TypographyOwnProps['variant'];
}
export interface LinkTypeMap<AdditionalProps = {}, RootComponent extends React.ElementType = 'a'> {
props: AdditionalProps & LinkOwnProps;
defaultComponent: RootComponent;
}
/**
*
* Demos:
*
* - [Breadcrumbs](https://mui.com/material-ui/react-breadcrumbs/)
* - [Links](https://mui.com/material-ui/react-link/)
*
* API:
*
* - [Link API](https://mui.com/material-ui/api/link/)
* - inherits [Typography API](https://mui.com/material-ui/api/typography/)
*/
declare const Link: OverridableComponent<LinkTypeMap>;
export type LinkBaseProps = DistributiveOmit<
TypographyOwnProps,
'children' | 'color' | 'variant' | 'classes'
>;
export type LinkProps<
RootComponent extends React.ElementType = LinkTypeMap['defaultComponent'],
AdditionalProps = {},
> = OverrideProps<LinkTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
component?: React.ElementType;
};
export default Link;