UNPKG

@alicloud/console-components

Version:

Alibaba Cloud React Components

47 lines (46 loc) 1.39 kB
var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; /** * title: "带标题卡片" * description: "标题可通过title属性定制" */ import React from 'react'; import { Card, Icon } from '@alicloud/console-components'; var cardContent = { background: '#f6f6f6', width: '100%', height: '100%', borderRadius: '4px', textAlign: 'center', lineHeight: '100%', color: '#aaaaaa', position: 'relative', }; var contentext = { lineHeight: '20px', position: 'absolute', top: '50%', width: '100%', marginTop: '-10px', }; var CardContent = function () { return (React.createElement("div", { style: cardContent }, React.createElement("div", { style: contentext }, "Card Content"))); }; var commonProps = { extra: React.createElement(Icon, { type: "more", size: "small" }), showHeadDivider: false, title: '标题Title', style: { width: 500 }, }; export default (function () { return (React.createElement(Card, __assign({}, commonProps), React.createElement(CardContent, null))); });