Commit 4509a81c authored by XieZhiXiong's avatar XieZhiXiong

feat: 更改样式

parent 2d49bfa6
.mellow {
:global {
.ant-card {
border-radius: 8px;
&-head {
border-bottom: none;
&-title {
line-height: 24px;
// padding-bottom: 0;
font-size: 14px;
font-weight: 500;
color: rgba(23, 43, 77, 1);
}
}
&-body {
padding: 14px 24px 24px;
}
}
}
&.fullHeight {
height: 100%;
:global {
.ant-card {
height: 100%;
display: flex;
flex-direction: column !important;
&-head {
flex-shrink: 0;
}
&-body {
flex: 1;
}
}
}
}
}
\ No newline at end of file
......@@ -2,15 +2,14 @@
* @Author: XieZhiXiong
* @Date: 2020-08-26 17:32:45
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-09-29 14:47:49
* @LastEditTime: 2021-05-11 15:15:55
* @Description: 基于 antd Card 封装的适合项目 UI 的 Card,使用方式跟 antd Card 一样,这里只是修改了样式
*/
import React from 'react';
import { Card } from 'antd';
import classNames from 'classnames';
import { CardProps } from 'antd/lib/card';
import styled from 'styled-components'
import styles from './index.less';
import styled from 'styled-components';
const Wrap = styled(props => <div {...props}/>)`
> .ant-card {
......@@ -20,9 +19,8 @@ const Wrap = styled(props => <div {...props}/>)`
border-bottom: none;
.ant-card-head-title {
line-height: 24px;
padding-bottom: 0;
font-size: 16px;
padding-bottom: 9px;
font-size: 14px;
font-weight: 500;
color: rgba(23, 43, 77, 1);
}
......@@ -53,12 +51,14 @@ const Wrap = styled(props => <div {...props}/>)`
`
export interface MellowCardProps extends CardProps {
blockClassName?: string;
fullHeight?: boolean; // 是否占满父级的高度,一般用于多列使用改组件的情况
/**
* 是否占满父级的高度,一般用于多列使用改组件的情况
*/
fullHeight?: boolean;
}
const MellowCard: React.FC<MellowCardProps> = props => {
const { children, blockClassName, fullHeight, ...rest } = props;
const { children, fullHeight, ...rest } = props;
const cls = classNames({
'fullHeight': fullHeight,
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment