docs: expanded rating form + UI docs improvement (#5211)
* docs: expanded rating form + UI docs improvement * added props table + changed example
This commit is contained in:
@@ -1,7 +1,17 @@
|
||||
import { GITHUB_ISSUES_PREFIX } from "../constants"
|
||||
import { GITHUB_ISSUES_PREFIX, GITHUB_UI_ISSUES_PREFIX } from "../constants"
|
||||
|
||||
export function formatReportLink(title: string, sectionTitle: string) {
|
||||
return `${GITHUB_ISSUES_PREFIX}&title=${encodeURI(
|
||||
title
|
||||
)}%3A%20Issue%20in%20${encodeURI(sectionTitle)}`
|
||||
export type ReportLinkType = "default" | "ui"
|
||||
|
||||
export function formatReportLink(
|
||||
title: string,
|
||||
sectionTitle: string,
|
||||
type?: ReportLinkType
|
||||
) {
|
||||
let prefix = GITHUB_ISSUES_PREFIX
|
||||
if (type === "ui") {
|
||||
prefix = GITHUB_UI_ISSUES_PREFIX
|
||||
}
|
||||
return `${prefix}&title=${encodeURI(title)}%3A%20Issue%20in%20${encodeURI(
|
||||
sectionTitle
|
||||
)}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user