This repository has been archived by the owner on Oct 18, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: repo settings for schedule and frequency
- Loading branch information
1 parent
0868a27
commit 8db475a
Showing
3 changed files
with
107 additions
and
18 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
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,51 @@ | ||
import classNames from "@/utils/classNames"; | ||
import { useFormStatus } from "react-dom"; | ||
|
||
export default function Select({ | ||
id, | ||
name, | ||
text, | ||
options, | ||
value, | ||
disabled, | ||
defaultValue, | ||
classNameSelect, | ||
}) { | ||
const { pending } = useFormStatus(); | ||
|
||
if (!name) { | ||
name = id; | ||
} | ||
|
||
if (!text) { | ||
text = name; | ||
} | ||
|
||
return ( | ||
<div> | ||
<label htmlFor={name} className="block text-sm font-medium leading-6"> | ||
{text} | ||
</label> | ||
<select | ||
id={id} | ||
name={name} | ||
defaultValue={defaultValue} | ||
disabled={disabled} | ||
className={classNames( | ||
"mt-2 block w-full rounded-md border-0 py-1.5 pl-3 pr-10 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-indigo-600 sm:text-sm sm:leading-6 disabled:bg-gray-600", | ||
classNameSelect, | ||
)} | ||
> | ||
{options?.map((option) => ( | ||
<option | ||
value={option.value} | ||
key={option.value} | ||
selected={option.value === value} | ||
> | ||
{option.text} | ||
</option> | ||
))} | ||
</select> | ||
</div> | ||
); | ||
} |