blob: ce7ac51b7bbeb8d80c4d4120abb9877a7d1edf85 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
import React from 'react';
import { Paper, Stack, Box } from '@mantine/core';
export function Content({
transparent,
withBorder,
padding,
borderStyle = 'solid',
stack = true,
sx,
...props
}) {
const Wrapper = stack ? Stack : Box;
return (
<Paper
sx={(theme) => ({
background: transparent && 'transparent',
border: withBorder
? `1px ${borderStyle} ${theme.cr.getSubtleBorderAndSeparator()}`
: 0,
})}
>
<Wrapper
sx={(theme) => ({
padding: padding ?? theme.spacing.md,
...sx,
})}
{...props}
/>
</Paper>
);
}
|