mirror of
https://github.com/fmhy/edit.git
synced 2026-01-29 15:21:11 +11:00
feat: reorganize repo
This commit is contained in:
parent
49eb39bc1f
commit
23389c69df
107 changed files with 15 additions and 429 deletions
29
docs/.vitepress/types/Feedback.ts
Normal file
29
docs/.vitepress/types/Feedback.ts
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
import z from 'zod'
|
||||
|
||||
export const FeedbackSchema = z.object({
|
||||
message: z.string().min(5).max(1000),
|
||||
type: z.enum(['bug', 'suggestion', 'appreciate', 'other']),
|
||||
page: z.string().optional()
|
||||
})
|
||||
|
||||
export const feedbackOptions = [
|
||||
{ label: '🐞 Bug', value: 'bug' },
|
||||
{
|
||||
label: '💡 Suggestion',
|
||||
value: 'suggestion'
|
||||
},
|
||||
{ label: '📂 Other', value: 'other' },
|
||||
{
|
||||
label: '❤️ Appreciation',
|
||||
value: 'appreciate'
|
||||
}
|
||||
]
|
||||
|
||||
export function getFeedbackOption(value: string): {
|
||||
label: string
|
||||
value: string
|
||||
} {
|
||||
return feedbackOptions.find((option) => option.value === value)
|
||||
}
|
||||
|
||||
export type FeedbackType = z.infer<typeof FeedbackSchema>
|
||||
Loading…
Add table
Add a link
Reference in a new issue