Remove invite button should not overlap with member dropdown button (#4243)

This commit is contained in:
Apoorv Mishra
2022-10-11 06:01:53 +05:30
committed by GitHub
parent b29344efce
commit 21b91ff060
2 changed files with 14 additions and 3 deletions

View File

@@ -58,11 +58,13 @@ const Wrapper = styled.div<{
flex?: boolean; flex?: boolean;
short?: boolean; short?: boolean;
minHeight?: number; minHeight?: number;
minWidth?: number;
maxHeight?: number; maxHeight?: number;
}>` }>`
flex: ${(props) => (props.flex ? "1" : "0")}; flex: ${(props) => (props.flex ? "1" : "0")};
width: ${(props) => (props.short ? "49%" : "auto")}; width: ${(props) => (props.short ? "49%" : "auto")};
max-width: ${(props) => (props.short ? "350px" : "100%")}; max-width: ${(props) => (props.short ? "350px" : "100%")};
min-width: ${({ minWidth }) => (minWidth ? `${minWidth}px` : "0")};
min-height: ${({ minHeight }) => (minHeight ? `${minHeight}px` : "0")}; min-height: ${({ minHeight }) => (minHeight ? `${minHeight}px` : "0")};
max-height: ${({ maxHeight }) => (maxHeight ? `${maxHeight}px` : "initial")}; max-height: ${({ maxHeight }) => (maxHeight ? `${maxHeight}px` : "initial")};
`; `;

View File

@@ -220,6 +220,7 @@ function Invite({ onSubmit }: Props) {
onChange={(ev) => handleChange(ev, index)} onChange={(ev) => handleChange(ev, index)}
value={invite.name} value={invite.name}
required={!!invite.email} required={!!invite.email}
flex
/> />
<InputSelectRole <InputSelectRole
onChange={(role: Role) => handleRoleChange(role, index)} onChange={(role: Role) => handleRoleChange(role, index)}
@@ -236,6 +237,11 @@ function Invite({ onSubmit }: Props) {
</Tooltip> </Tooltip>
</Remove> </Remove>
)} )}
{index === 0 && invites.length > 1 && (
<Remove>
<Spacer />
</Remove>
)}
</Flex> </Flex>
))} ))}
@@ -272,9 +278,12 @@ const CopyBlock = styled("div")`
`; `;
const Remove = styled("div")` const Remove = styled("div")`
margin-top: 6px; margin-top: 4px;
position: absolute; `;
right: -32px;
const Spacer = styled.div`
width: 24px;
height: 24px;
`; `;
export default observer(Invite); export default observer(Invite);