fix: Spacing issues on connected slack channels list

This commit is contained in:
Tom Moor
2022-02-22 20:08:32 -08:00
parent f244e864e1
commit 8832808fbe
2 changed files with 6 additions and 7 deletions

View File

@@ -10,7 +10,6 @@ type Props = {
title: React.ReactNode;
subtitle?: React.ReactNode;
actions?: React.ReactNode;
compact?: boolean;
border?: boolean;
small?: boolean;
};
@@ -50,7 +49,7 @@ const ListItem = (
<Wrapper
ref={ref}
$border={border}
$compact={compact}
$small={small}
activeStyle={{
background: theme.primary,
}}
@@ -64,16 +63,17 @@ const ListItem = (
}
return (
<Wrapper $compact={compact} $border={border} {...rest}>
<Wrapper $border={border} $small={small} {...rest}>
{content(false)}
</Wrapper>
);
};
const Wrapper = styled.div<{ $compact?: boolean; $border?: boolean }>`
const Wrapper = styled.div<{ $small?: boolean; $border?: boolean }>`
display: flex;
margin: ${(props) => (props.$compact === false ? 0 : "8px 0")};
padding: ${(props) => (props.$compact === false ? "8px 0" : 0)};
padding: ${(props) => (props.$border === false ? 0 : "8px 0")};
margin: ${(props) =>
props.$border === false ? (props.$small ? "8px 0" : "16px 0") : 0};
border-bottom: 1px solid
${(props) =>
props.$border === false ? "transparent" : props.theme.divider};