mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-27 23:06:29 -04:00
Convert Page components to TypeScript
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import React, { useCallback } from 'react';
|
||||
import Link from 'Components/Link/Link';
|
||||
import styles from './PageJumpBarItem.css';
|
||||
|
||||
export interface PageJumpBarItemProps {
|
||||
label: string;
|
||||
onItemPress: (label: string) => void;
|
||||
}
|
||||
|
||||
function PageJumpBarItem({ label, onItemPress }: PageJumpBarItemProps) {
|
||||
const handlePress = useCallback(() => {
|
||||
onItemPress(label);
|
||||
}, [label, onItemPress]);
|
||||
|
||||
return (
|
||||
<Link className={styles.jumpBarItem} onPress={handlePress}>
|
||||
{label.toUpperCase()}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
||||
export default PageJumpBarItem;
|
||||
Reference in New Issue
Block a user