Paper
import { Surface } from 'wisteria-ui';
用法
Variant
<Surface variant="outlined">
<Box width={180} height={80}>Outlined</Box>
</Surface>
<Surface variant="elevated" elevation={3}>
<Box width={180} height={80}>Elevated</Box>
</Surface>
Elevation
Array.from({ length: 6 }, (_, index) => index).map(elevation => (
<Surface elevation={elevation}>
<Box width={180} height={80} className="bg-transparent">
{`elevation-${elevation}`}
</Box>
</Surface>
));
Corner
<Surface corner="999px" elevation={3}>
<Box>Corner - Full</Box>
</Surface>
API
属性 | 说明 | 类型 | 默认值 |
---|---|---|---|
corner | 指定圆角大小 | number | string | - |
elevation | 指定阴影层级,0~5 | number | 1 |
variant | 变体类型 | elevation | outlined | elevation |
bgColor | 背景颜色 | string | colors.surface |