mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-02 02:42:41 +02:00
refactor: declare all props as interfaces (#6730)
* refactor: declare all props as interfaces * fix * fix...
This commit is contained in:
parent
5555290edc
commit
c38200ba5b
11 changed files with 44 additions and 55 deletions
|
@ -25,10 +25,10 @@ declare module '@docusaurus/plugin-pwa' {
|
|||
}
|
||||
|
||||
declare module '@theme/PwaReloadPopup' {
|
||||
export type PwaReloadPopupProps = {
|
||||
export interface Props {
|
||||
readonly onReload: () => void;
|
||||
};
|
||||
}
|
||||
|
||||
const PwaReloadPopup: (props: PwaReloadPopupProps) => JSX.Element;
|
||||
const PwaReloadPopup: (props: Props) => JSX.Element;
|
||||
export default PwaReloadPopup;
|
||||
}
|
||||
|
|
|
@ -9,11 +9,11 @@ import React, {useState} from 'react';
|
|||
import clsx from 'clsx';
|
||||
import Translate, {translate} from '@docusaurus/Translate';
|
||||
|
||||
import type {PwaReloadPopupProps} from '@theme/PwaReloadPopup';
|
||||
import type {Props} from '@theme/PwaReloadPopup';
|
||||
|
||||
import styles from './styles.module.css';
|
||||
|
||||
function PwaReloadPopup({onReload}: PwaReloadPopupProps): JSX.Element | false {
|
||||
function PwaReloadPopup({onReload}: Props): JSX.Element | false {
|
||||
const [isVisible, setIsVisible] = useState(true);
|
||||
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue