This repository has been archived by the owner on Dec 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac57e06
commit eced696
Showing
4 changed files
with
141 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { forwardRef, ComponentPropsWithoutRef } from "react"; | ||
import { twMerge } from "tailwind-merge"; | ||
|
||
export type SelectProps = ComponentPropsWithoutRef<"select"> & { | ||
label: string; | ||
}; | ||
export const Select = forwardRef<HTMLSelectElement, SelectProps>( | ||
(props: SelectProps, ref) => { | ||
const selectProps: Omit<SelectProps, "label"> & { label?: string } = { | ||
...props, | ||
}; | ||
delete selectProps.label; | ||
return ( | ||
<label className="flex flex-col"> | ||
<span className="text-sm font-bold">{props.label}</span> | ||
<select | ||
{...selectProps} | ||
ref={ref} | ||
className={twMerge( | ||
"rounded-xl border border-gray-200 bg-transparent px-2 py-1 transition-colors disabled:opacity-70 dark:border-gray-700", | ||
props.className, | ||
)} | ||
/> | ||
</label> | ||
); | ||
}, | ||
); | ||
|
||
export type OptionProps = ComponentPropsWithoutRef<"option">; | ||
export const Option = forwardRef<HTMLOptionElement, OptionProps>( | ||
(props: OptionProps, ref) => { | ||
return ( | ||
<option | ||
{...props} | ||
className={twMerge("bg-white dark:bg-gray-900", props.className)} | ||
ref={ref} | ||
/> | ||
); | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// See https://github.com/meower-media-co/Meower-Svelte/blob/29b7bbd68fa209e2ec439ee45a7581a036a88451/src/lib/modals/safety/ReportPost.svelte#L68-L78, licensed under MIT by Meower Media | ||
|
||
export const REPORT_REASONS = [ | ||
"Spam", | ||
"Harassment or abuse towards others", | ||
"Rude, vulgar or offensive language", | ||
"NSFW (sexual, alcohol, violence, gore, etc.)", | ||
"Scams, hacks, phishing or other malicious content", | ||
"Threatening violence or real world harm", | ||
"Illegal activity", | ||
"Self-harm/suicide", | ||
"Other", | ||
]; |