Skip to content

Commit 049a476

Browse files
committed
Refactor
1 parent a80e1b5 commit 049a476

File tree

5 files changed

+5
-24
lines changed

5 files changed

+5
-24
lines changed

src/Menu/MenuList.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ export default function MenuList<
127127
...rest
128128
}: MenuListProps<V, I, HI>): JSX.Element {
129129
const { rc } = useTheme();
130-
// const css = useStyles({ classes: { root: className, header: headerProps?.className } });
131130

132131
const backHandler = useRefCallback<React.MouseEventHandler>((event) => {
133132
onBack && stopPropagation(event);

src/Tooltip/Tooltip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export default function Tooltip({
150150
calcArrowCss(
151151
tooltip.alignX,
152152
tooltip.alignY,
153-
rc?.Tooltip?.arrowColor || rc?.Tooltip?.style?.backgroundColor || 'rgba(50, 50, 50, 0.8)',
153+
rc?.Tooltip?.arrowColor || 'rgba(50, 50, 50, 0.8)',
154154
`${container.clientHeight / 4}px`
155155
)
156156
);

src/Transition/Transition.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const getClassName = (
5050
): string => {
5151
const isStringClassNames = typeof classNames === 'string';
5252
const prefix = isStringClassNames && classNames ? `${classNames}-` : '';
53-
return isStringClassNames ? `${prefix}${status}` : classNames[status] ?? '';
53+
return isStringClassNames ? `${prefix}${status}` : (classNames[status] ?? '');
5454
};
5555

5656
export default React.forwardRef(function Transition(

src/VideoWatermark/math.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export function getHipotenuza(katA: number, katB: number): number {
2-
return Math.sqrt(Math.pow(katA, 2) + Math.pow(katB, 2));
2+
return Math.sqrt(katA ** 2 + katB ** 2);
33
}
44

55
export function getTriangleHeight(katA: number, katB: number): number {

src/theme.ts

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
import type {
2-
BaseCSSProperties,
3-
CSSProperties as CSSPropertiesOrigin,
4-
// StyleRules,
5-
} from '@mui/styles/withStyles';
1+
import type { CSSObject } from '@mui/styled-engine';
62
import type { FlexOnlyProps, SpaceProps } from 'reflexy/styled';
73
import type { SvgSpriteIconProps } from './svg/SvgSpriteIcon';
84
import type { MenuListItemProps } from './Menu/MenuListItem';
@@ -11,20 +7,7 @@ import type { ModalProps } from './Modal';
117
import type { NotificationPosition, NotificationVariant } from './Notifications';
128
import type { FieldState } from './Field';
139

14-
// export interface CSSPropertiesDeep extends BaseCSSProperties {
15-
// [k: string]: any | CSSPropertiesDeep;
16-
// }
17-
18-
export type BaseCreateCSSProperties = {
19-
[P in keyof BaseCSSProperties]: BaseCSSProperties[P];
20-
};
21-
22-
export interface CreateCSSProperties extends BaseCreateCSSProperties {
23-
// Allow pseudo selectors and media queries
24-
[k: string]: BaseCreateCSSProperties[keyof BaseCreateCSSProperties] | CreateCSSProperties;
25-
}
26-
27-
export type CSSProperties = CSSPropertiesOrigin | CreateCSSProperties;
10+
export type CSSProperties = CSSObject;
2811

2912
export type ButtonThemeSizes = {
3013
[P in ButtonSize as `size-${P}`]?: CSSProperties | undefined;
@@ -407,6 +390,5 @@ export interface Theme {
407390
type AppTheme = Theme;
408391

409392
declare module '@mui/system/createTheme' {
410-
// eslint-disable-next-line no-shadow
411393
export interface Theme extends AppTheme {}
412394
}

0 commit comments

Comments
 (0)