mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-11 20:44:32 -05:00
39 lines
836 B
TypeScript
39 lines
836 B
TypeScript
import { type ComponentProps, forwardRef } from 'react';
|
|
|
|
import { theme } from './theme';
|
|
import { View } from './View';
|
|
|
|
type CardProps = ComponentProps<typeof View>;
|
|
|
|
export const Card = forwardRef<HTMLDivElement, CardProps>(
|
|
({ children, ...props }, ref) => {
|
|
return (
|
|
<View
|
|
{...props}
|
|
ref={ref}
|
|
style={{
|
|
marginTop: 15,
|
|
marginLeft: 5,
|
|
marginRight: 5,
|
|
borderRadius: 6,
|
|
backgroundColor: theme.cardBackground,
|
|
borderColor: theme.cardBorder,
|
|
boxShadow: '0 1px 2px #9594A8',
|
|
...props.style,
|
|
}}
|
|
>
|
|
<View
|
|
style={{
|
|
borderRadius: 6,
|
|
overflow: 'hidden',
|
|
}}
|
|
>
|
|
{children}
|
|
</View>
|
|
</View>
|
|
);
|
|
},
|
|
);
|
|
|
|
Card.displayName = 'Card';
|