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

@ -8,7 +8,7 @@ import Avatar from "components/Avatar";
import Badge from "components/Badge";
import Button from "components/Button";
import Flex from "components/Flex";
import InputSelect from "components/InputSelect";
import InputSelect, { type Props as SelectProps } from "components/InputSelect";
import ListItem from "components/List/Item";
import Time from "components/Time";
import MemberMenu from "menus/MemberMenu";
@ -64,9 +64,11 @@ const MemberListItem = ({
label={t("Permissions")}
options={PERMISSIONS}
value={membership ? membership.permission : undefined}
onChange={(ev) => onUpdate(ev.target.value)}
onChange={onUpdate}
disabled={!canEdit}
ariaLabel={t("Permissions")}
labelHidden
nude
/>
)}
{canEdit && (
@ -90,7 +92,7 @@ const Spacer = styled.div`
width: 8px;
`;
const Select = styled(InputSelect)`
const Select = (styled(InputSelect)`
margin: 0;
font-size: 14px;
border-color: transparent;
@ -98,6 +100,6 @@ const Select = styled(InputSelect)`
select {
margin: 0;
}
`;
`: React.ComponentType<SelectProps>);
export default MemberListItem;