mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 02:13:33 +00:00
Add files
This commit is contained in:
commit
e87c814068
266 changed files with 63938 additions and 0 deletions
31
src/renderer/components/scroll-area/index.tsx
Normal file
31
src/renderer/components/scroll-area/index.tsx
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import type { ScrollAreaProps as MantineScrollAreaProps } from '@mantine/core';
|
||||
import { ScrollArea as MantineScrollArea } from '@mantine/core';
|
||||
import styled from 'styled-components';
|
||||
|
||||
interface ScrollAreaProps extends MantineScrollAreaProps {
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
const StyledScrollArea = styled(MantineScrollArea)`
|
||||
& .mantine-ScrollArea-thumb {
|
||||
background: var(--scrollbar-thumb-bg);
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
& .mantine-ScrollArea-scrollbar {
|
||||
width: 12px;
|
||||
padding: 0;
|
||||
background: var(--scrollbar-track-bg);
|
||||
}
|
||||
`;
|
||||
|
||||
export const ScrollArea = ({ children, ...props }: ScrollAreaProps) => {
|
||||
return (
|
||||
<StyledScrollArea
|
||||
offsetScrollbars
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</StyledScrollArea>
|
||||
);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue