Skip to content

Commit

Permalink
run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed May 21, 2021
1 parent 7e3d8f4 commit a8e961c
Showing 1 changed file with 48 additions and 50 deletions.
98 changes: 48 additions & 50 deletions packages/material-ui-lab/src/LoadingButton/LoadingButton.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,54 @@ import { OverrideProps } from '@material-ui/core/OverridableComponent';
import { Theme } from '@material-ui/core/styles';
import { SxProps } from '@material-ui/system';

export type LoadingButtonTypeMap<
P = {},
D extends React.ElementType = 'button'
> = ExtendButtonTypeMap<{
props: P & {
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<ButtonClasses> & {
/** Styles applied to the root element. */
root?: string;
/** Styles applied to the root element if `loading={true}`. */
loading?: string;
/** Styles applied to the loadingIndicator element. */
loadingIndicator?: string;
/** Styles applied to the loadingIndicator element if `loadingPosition="center"`. */
loadingIndicatorCenter?: string;
/** Styles applied to the loadingIndicator element if `loadingPosition="start"`. */
loadingIndicatorStart?: string;
/** Styles applied to the loadingIndicator element if `loadingPosition="end"`. */
loadingIndicatorEnd?: string;
/** Styles applied to the endIcon element if `loading={true}` and `loadingPosition="end"`. */
endIconLoadingEnd?: string;
/** Styles applied to the startIcon element if `loading={true}` and `loadingPosition="start"`. */
startIconLoadingStart?: string;
/** Styles applied to the label element if `loading={true}` and `loadingPosition="center"`. */
labelLoadingCenter?: string;
export type LoadingButtonTypeMap<P = {}, D extends React.ElementType = 'button'> =
ExtendButtonTypeMap<{
props: P & {
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<ButtonClasses> & {
/** Styles applied to the root element. */
root?: string;
/** Styles applied to the root element if `loading={true}`. */
loading?: string;
/** Styles applied to the loadingIndicator element. */
loadingIndicator?: string;
/** Styles applied to the loadingIndicator element if `loadingPosition="center"`. */
loadingIndicatorCenter?: string;
/** Styles applied to the loadingIndicator element if `loadingPosition="start"`. */
loadingIndicatorStart?: string;
/** Styles applied to the loadingIndicator element if `loadingPosition="end"`. */
loadingIndicatorEnd?: string;
/** Styles applied to the endIcon element if `loading={true}` and `loadingPosition="end"`. */
endIconLoadingEnd?: string;
/** Styles applied to the startIcon element if `loading={true}` and `loadingPosition="start"`. */
startIconLoadingStart?: string;
/** Styles applied to the label element if `loading={true}` and `loadingPosition="center"`. */
labelLoadingCenter?: string;
};
/**
* If `true`, the loading indicator is shown.
* @default false
*/
loading?: boolean;
/**
* Element placed before the children if the button is in loading state.
* @default <CircularProgress color="inherit" size={16} />
*/
loadingIndicator?: React.ReactNode;
/**
* The loading indicator can be positioned on the start, end, or the center of the button.
* @default 'center'
*/
loadingPosition?: 'start' | 'end' | 'center';
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
};
/**
* If `true`, the loading indicator is shown.
* @default false
*/
loading?: boolean;
/**
* Element placed before the children if the button is in loading state.
* @default <CircularProgress color="inherit" size={16} />
*/
loadingIndicator?: React.ReactNode;
/**
* The loading indicator can be positioned on the start, end, or the center of the button.
* @default 'center'
*/
loadingPosition?: 'start' | 'end' | 'center';
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
};
defaultComponent: D;
}>;
defaultComponent: D;
}>;

/**
*
Expand All @@ -69,7 +67,7 @@ declare const LoadingButton: ExtendButton<LoadingButtonTypeMap>;

export type LoadingButtonProps<
D extends React.ElementType = LoadingButtonTypeMap['defaultComponent'],
P = {}
P = {},
> = OverrideProps<LoadingButtonTypeMap<P, D>, D>;

export type LoadingButtonClassKey = keyof NonNullable<LoadingButtonTypeMap['props']['classes']>;
Expand Down

0 comments on commit a8e961c

Please sign in to comment.