mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-26 21:28:40 +00:00
Prefer type to interface and add an ESLint rule
This commit is contained in:
committed by
Scott Nonnenberg
parent
c85c073669
commit
8a72607fa7
@@ -24,7 +24,7 @@ const colorSVG = (url: string, color: string) => {
|
||||
};
|
||||
};
|
||||
|
||||
export interface Props {
|
||||
export type Props = {
|
||||
close: () => void;
|
||||
contentType: MIME.MIMEType | undefined;
|
||||
i18n: LocalizerType;
|
||||
@@ -34,10 +34,10 @@ export interface Props {
|
||||
onNext?: () => void;
|
||||
onPrevious?: () => void;
|
||||
onSave?: () => void;
|
||||
}
|
||||
interface State {
|
||||
};
|
||||
type State = {
|
||||
videoTime?: number;
|
||||
}
|
||||
};
|
||||
|
||||
const CONTROLS_WIDTH = 50;
|
||||
const CONTROLS_SPACING = 10;
|
||||
@@ -158,12 +158,12 @@ const styles = {
|
||||
},
|
||||
};
|
||||
|
||||
interface IconButtonProps {
|
||||
type IconButtonProps = {
|
||||
i18n: LocalizerType;
|
||||
onClick?: () => void;
|
||||
style?: React.CSSProperties;
|
||||
type: 'save' | 'close' | 'previous' | 'next';
|
||||
}
|
||||
};
|
||||
|
||||
const IconButton = ({ i18n, onClick, style, type }: IconButtonProps) => {
|
||||
const clickHandler = (event: React.MouseEvent<HTMLButtonElement>): void => {
|
||||
|
||||
Reference in New Issue
Block a user