ant-design/components/divider/demo/customize-style.md
二货爱吃白萝卜 d6ae60cd01
fix: Divider horizontal line align (#39334)
* fix: divider hor align

* test: Update snapshot
2022-12-07 11:42:32 +08:00

930 B

order title debug
9999
zh-CN en-US
样式自定义 Style Customization
true

zh-CN

测试一些 style 修改样式的行为。

en-US

Use style to change default style.

import { Divider } from 'antd';
import React from 'react';

const App: React.FC = () => (
  <>
    <Divider style={{ borderWidth: 2, borderColor: '#7cb305' }} />
    <Divider style={{ borderColor: '#7cb305' }} dashed />
    <Divider style={{ borderColor: '#7cb305' }} dashed>
      Text
    </Divider>
    <Divider type="vertical" style={{ height: 60, borderColor: '#7cb305' }} />
    <Divider type="vertical" style={{ height: 60, borderColor: '#7cb305' }} dashed />

    <div style={{ display: 'flex', flexDirection: 'column', height: 50, boxShadow: '0 0 1px red' }}>
      <Divider style={{ background: 'rgba(0,255,0,0.05)' }} orientation="left">
        Text
      </Divider>
    </div>
  </>
);

export default App;