Skip to content

Commit a68aebb

Browse files
committed
fix height issue with inline-flex text
1 parent 5ceda5e commit a68aebb

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

client/components/Text.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const Text = ({
4848
<Box
4949
display="inline-flex"
5050
alignItems="center"
51+
verticalAlign="bottom"
5152
my={my}
5253
mt={mt}
5354
mb={mb}
@@ -57,10 +58,18 @@ const Text = ({
5758
{...iconTextWrapperProps}
5859
>
5960
<Box
60-
display="flex"
61-
alignItems="center"
6261
color={iconColor}
62+
width={`${iconSize}px`}
63+
height={`${iconSize}px`}
6364
mr={2}
65+
position="relative"
66+
_css={{
67+
svg: {
68+
position: 'absolute',
69+
top: 0,
70+
left: 0,
71+
},
72+
}}
6473
{...iconWrapperProps}
6574
>
6675
<Icon size={iconSize} />

client/pages/torrent/[infoHash].js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const FileItem = ({ file, depth = 0 }) => (
7777
<Text
7878
fontSize={1}
7979
icon={file.children.length ? Folder : File}
80-
iconSize="18px"
80+
iconSize={18}
8181
>
8282
{file.name}
8383
{file.size !== undefined ? (

0 commit comments

Comments
 (0)