组件
Surface

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>
预览

Outlined

Elevated

Elevation

Array.from({ length: 6 }, (_, index) => index).map(elevation => (
  <Surface elevation={elevation}>
    <Box width={180} height={80} className="bg-transparent">
      {`elevation-${elevation}`}
    </Box>
  </Surface>
));
预览
elevation-0
elevation-1
elevation-2
elevation-3
elevation-4
elevation-5

Corner

<Surface corner="999px" elevation={3}>
  <Box>Corner - Full</Box>
</Surface>
预览

Corner - None

Corner - 16px

Corner - Full

API

属性说明类型默认值
corner指定圆角大小number | string-
elevation指定阴影层级,0~5number1
variant变体类型elevation | outlinedelevation
bgColor背景颜色stringcolors.surface