mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-23 22:25:56 -04:00
23 lines
553 B
TypeScript
23 lines
553 B
TypeScript
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;
|