Enforce some naming conventions (#4813)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2022-03-01 13:06:53 -05:00
1 parent dc6615f98f
commit 0b32775d40
197 files changed
+630 -634

No files matched your search

+2 -2
View File
@@ -8,11 +8,11 @@ import styles from "./switch.module.scss";
import React, { ChangeEvent, HTMLProps } from "react";
import { cssNames } from "../../utils";
interface Props extends Omit<HTMLProps<HTMLInputElement>, "onChange"> {
export interface SwitchProps extends Omit<HTMLProps<HTMLInputElement>, "onChange"> {
onChange?: (checked: boolean, event: ChangeEvent<HTMLInputElement>) => void;
}
export function Switch({ children, disabled, onChange, ...props }: Props) {
export function Switch({ children, disabled, onChange, ...props }: SwitchProps) {
return (
<label className={cssNames(styles.Switch, { [styles.disabled]: disabled })} data-testid="switch">
{children}
+2 -2
View File
@@ -11,7 +11,7 @@ interface Styles extends Partial<Record<SwitchClassKey, string>> {
focusVisible?: string;
}
interface Props extends SwitchProps {
export interface SwitcherProps extends SwitchProps {
classes: Styles;
}
@@ -58,7 +58,7 @@ export const Switcher = withStyles((theme: Theme) =>
checked: {},
focusVisible: {},
}),
)(({ classes, ...props }: Props) => {
)(({ classes, ...props }: SwitcherProps) => {
return (
<Switch
focusVisibleClassName={classes.focusVisible}