Blame view

天文台pc/tianwentai-ui/node_modules/@mui/material/SvgIcon/SvgIcon.d.ts 3.47 KB
bc518174   王天杨   提交两个项目文件
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
  import * as React from 'react';
  import { SxProps } from '@mui/system';
  import { OverridableStringUnion } from '@mui/types';
  import { Theme } from "../styles/index.js";
  import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.js";
  import { SvgIconClasses } from "./svgIconClasses.js";
  export interface SvgIconPropsSizeOverrides {}
  export interface SvgIconPropsColorOverrides {}
  export interface SvgIconOwnProps {
    /**
     * Node passed into the SVG element.
     */
    children?: React.ReactNode;
    /**
     * Override or extend the styles applied to the component.
     */
    classes?: Partial<SvgIconClasses>;
    /**
     * The color of the component.
     * It supports both default and custom theme colors, which can be added as shown in the
     * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
     * You can use the `htmlColor` prop to apply a color attribute to the SVG element.
     * @default 'inherit'
     */
    color?: OverridableStringUnion<'inherit' | 'action' | 'disabled' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning', SvgIconPropsColorOverrides>;
    /**
     * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.
     * @default 'medium'
     */
    fontSize?: OverridableStringUnion<'inherit' | 'large' | 'medium' | 'small', SvgIconPropsSizeOverrides>;
    /**
     * Applies a color attribute to the SVG element.
     */
    htmlColor?: string;
    /**
     * If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`
     * prop will be ignored.
     * Useful when you want to reference a custom `component` and have `SvgIcon` pass that
     * `component`'s viewBox to the root node.
     * @default false
     */
    inheritViewBox?: boolean;
    /**
     * The shape-rendering attribute. The behavior of the different options is described on the
     * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/shape-rendering).
     * If you are having issues with blurry icons you should investigate this prop.
     */
    shapeRendering?: string;
    /**
     * The system prop that allows defining system overrides as well as additional CSS styles.
     */
    sx?: SxProps<Theme>;
    /**
     * Provides a human-readable title for the element that contains it.
     * https://www.w3.org/TR/SVG-access/#Equivalent
     */
    titleAccess?: string;
    /**
     * Allows you to redefine what the coordinates without units mean inside an SVG element.
     * For example, if the SVG element is 500 (width) by 200 (height),
     * and you pass viewBox="0 0 50 20",
     * this means that the coordinates inside the SVG will go from the top left corner (0,0)
     * to bottom right (50,20) and each unit will be worth 10px.
     * @default '0 0 24 24'
     */
    viewBox?: string;
  }
  export interface SvgIconTypeMap<AdditionalProps = {}, RootComponent extends React.ElementType = 'svg'> {
    props: AdditionalProps & SvgIconOwnProps;
    defaultComponent: RootComponent;
  }
  /**
   *
   * Demos:
   *
   * - [Icons](https://mui.com/material-ui/icons/)
   * - [Material Icons](https://mui.com/material-ui/material-icons/)
   *
   * API:
   *
   * - [SvgIcon API](https://mui.com/material-ui/api/svg-icon/)
   */
  declare const SvgIcon: OverridableComponent<SvgIconTypeMap> & {
    muiName: string;
  };
  export type SvgIconProps<RootComponent extends React.ElementType = SvgIconTypeMap['defaultComponent'], AdditionalProps = {}> = OverrideProps<SvgIconTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
    component?: React.ElementType;
  };
  export default SvgIcon;