fix: Implement custom Select Input (#2571)

This commit is contained in:
Saumya Pandey
2021-10-07 10:18:43 +05:30
committed by GitHub
parent 99381d10ff
commit 40e09dd829
16 changed files with 636 additions and 264 deletions

View File

@ -3,7 +3,9 @@ import * as React from "react";
import { useTranslation } from "react-i18next";
import InputSelect, { type Props, type Option } from "components/InputSelect";
const InputSelectRole = (props: $Rest<Props, { options: Array<Option> }>) => {
const InputSelectRole = (
props: $Rest<$Exact<Props>, {| options: Array<Option>, ariaLabel: string |}>
) => {
const { t } = useTranslation();
return (
@ -14,6 +16,7 @@ const InputSelectRole = (props: $Rest<Props, { options: Array<Option> }>) => {
{ label: t("Viewer"), value: "viewer" },
{ label: t("Admin"), value: "admin" },
]}
ariaLabel={t("Role")}
{...props}
/>
);