Portal/rsconcept/frontend/src/features/help/components/LinkTopic.tsx

19 lines
415 B
TypeScript
Raw Normal View History

import { urls } from '@/app';
import { TextURL } from '@/components/Control';
2024-06-07 20:17:03 +03:00
import { HelpTopic } from '../models/helpTopic';
2024-06-07 20:17:03 +03:00
interface TextURLProps {
2024-10-31 15:21:21 +03:00
/** Text to display. */
2024-06-07 20:17:03 +03:00
text: string;
2024-10-31 15:21:21 +03:00
/** Topic to link to. */
2024-06-07 20:17:03 +03:00
topic: HelpTopic;
}
2024-10-31 15:21:21 +03:00
/**
* Displays a link to a help topic.
*/
2025-02-07 10:53:49 +03:00
export function LinkTopic({ text, topic }: TextURLProps) {
2024-06-07 20:17:03 +03:00
return <TextURL text={text} href={urls.help_topic(topic)} />;
}