feat: adding variant props to divider (#49654)
The divider border style can be either solid, dashed or dotted based on the variant props. The default value is solid. Signed-off-by: Pinaki Raj <pinakiraj15@gmail.com>pull/49691/head
parent
800c3fcbdb
commit
218e1cea3d
@ -0,0 +1,7 @@
|
||||
## zh-CN
|
||||
|
||||
分隔线默认为 `solid`(实线)变体。您可以将其更改为 `dashed`(虚线)或 `dotted`(点线)。
|
||||
|
||||
## en-US
|
||||
|
||||
Divider is of `solid` variant by default. You can change that to either `dashed` or `dotted`.
|
@ -0,0 +1,28 @@
|
||||
import React from 'react';
|
||||
import { Divider } from 'antd';
|
||||
|
||||
const App: React.FC = () => (
|
||||
<>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista
|
||||
probare, quae sunt a te dicta? Refert tamen, quo modo.
|
||||
</p>
|
||||
<Divider style={{ borderColor: '#7cb305' }}>Solid</Divider>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista
|
||||
probare, quae sunt a te dicta? Refert tamen, quo modo.
|
||||
</p>
|
||||
<Divider variant="dotted" style={{ borderColor: '#7cb305' }}>Dotted</Divider>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista
|
||||
probare, quae sunt a te dicta? Refert tamen, quo modo.
|
||||
</p>
|
||||
<Divider variant="dashed" style={{ borderColor: '#7cb305' }} dashed >Dashed</Divider>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista
|
||||
probare, quae sunt a te dicta? Refert tamen, quo modo.
|
||||
</p>
|
||||
</>
|
||||
);
|
||||
|
||||
export default App;
|
Loading…
Reference in New Issue