Skip to content

Commit 166f4a2

Browse files
committed
fix: prevent copy icon overlapping code block on small screens by adding responsive padding
1 parent e594250 commit 166f4a2

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

src/components/DatasetDetailPage/LoadDatasetTabs.tsx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,19 +142,26 @@ const LoadDatasetTabs: React.FC<LoadDatasetTabsProps> = ({
142142
<ContentCopyIcon fontSize="small" sx={{ color: Colors.green }} />
143143
</Tooltip>
144144
</IconButton>
145-
<SyntaxHighlighter
146-
language={language}
147-
style={atomOneDark}
148-
customStyle={{
149-
padding: "12px",
145+
<Box
146+
sx={{
147+
padding: { xs: "25px 20px 16px 16px", sm: "25px 20px 16px 16px" },
150148
borderRadius: "5px",
151-
fontSize: "14px",
152-
background: Colors.black,
149+
fontSize: "16px",
150+
backgroundColor: Colors.black,
153151
overflowX: "auto",
154152
}}
155153
>
156-
{code}
157-
</SyntaxHighlighter>
154+
<SyntaxHighlighter
155+
language={language}
156+
style={atomOneDark}
157+
customStyle={{
158+
background: "transparent",
159+
margin: 0,
160+
}}
161+
>
162+
{code}
163+
</SyntaxHighlighter>
164+
</Box>
158165
</Box>
159166
);
160167
};

0 commit comments

Comments
 (0)