Skip to content

Commit

Permalink
[@mantine/prism] Fix copy icon interfering with code (#2171)
Browse files Browse the repository at this point in the history
  • Loading branch information
rtivital committed Aug 27, 2022
1 parent cf8660f commit 4c49696
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/mantine-prism/src/Prism/Prism.story.tsx
Expand Up @@ -46,3 +46,11 @@ export const WithTabs = () => (
</Prism.Tabs>
</div>
);

export const LargeLine = () => (
<Prism language="javascript" withLineNumbers>
Line that is so large that it will cause overflow Lorem ipsum dolor sit amet consectetur, Line
that is so large that it will cause overflow Lorem ipsum dolor sit amet consectetur, Line that
is so large that it will cause overflow Lorem ipsum dolor sit amet consectetur,
</Prism>
);
4 changes: 4 additions & 0 deletions src/mantine-prism/src/Prism/Prism.styles.ts
Expand Up @@ -34,6 +34,10 @@ export default createStyles(
right: theme.dir === 'ltr' ? theme.spacing.xs : 'unset',
left: theme.dir === 'rtl' ? theme.spacing.xs : 'unset',
zIndex: 2,

'&, &:hover': {
backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[8] : theme.colors.gray[0],
},
},

line: {
Expand Down

0 comments on commit 4c49696

Please sign in to comment.