Portal/rsconcept/frontend/src/components/ui/Control/LinkTopic.tsx

19 lines
412 B
TypeScript
Raw Normal View History

2024-06-07 20:17:03 +03:00
import { urls } from '@/app/urls';
import { HelpTopic } from '@/models/miscellaneous';
2025-02-07 10:53:49 +03:00
import { TextURL } from './TextURL';
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)} />;
}