mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 14:13:37 +08:00
fix: Typography demo Interactive (#25908)
This commit is contained in:
parent
b9db9cd79f
commit
2f99dd8c19
@ -326,7 +326,7 @@ Array [
|
||||
|
||||
exports[`renders ./components/typography/demo/interactive.md correctly 1`] = `
|
||||
Array [
|
||||
<span
|
||||
<div
|
||||
class="ant-typography"
|
||||
>
|
||||
This is an editable text.
|
||||
@ -358,9 +358,8 @@ Array [
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
</span>,
|
||||
<br />,
|
||||
<span
|
||||
</div>,
|
||||
<div
|
||||
class="ant-typography"
|
||||
>
|
||||
This is a copyable text.
|
||||
@ -392,9 +391,8 @@ Array [
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
</span>,
|
||||
<br />,
|
||||
<span
|
||||
</div>,
|
||||
<div
|
||||
class="ant-typography"
|
||||
>
|
||||
Replace copy text.
|
||||
@ -426,9 +424,8 @@ Array [
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
</span>,
|
||||
<br />,
|
||||
<span
|
||||
</div>,
|
||||
<div
|
||||
class="ant-typography"
|
||||
>
|
||||
Custom icon.
|
||||
@ -460,7 +457,7 @@ Array [
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
</span>,
|
||||
</div>,
|
||||
<div
|
||||
class="ant-typography"
|
||||
>
|
||||
|
@ -17,7 +17,7 @@ Provide additional interactive capacity of editable and copyable.
|
||||
import { Typography } from 'antd';
|
||||
import { SmileOutlined } from '@ant-design/icons';
|
||||
|
||||
const { Text, Paragraph } = Typography;
|
||||
const { Paragraph } = Typography;
|
||||
|
||||
class Demo extends React.Component {
|
||||
state = {
|
||||
@ -32,13 +32,10 @@ class Demo extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
<Text editable={{ onChange: this.onChange }}>{this.state.str}</Text>
|
||||
<br />
|
||||
<Text copyable>This is a copyable text.</Text>
|
||||
<br />
|
||||
<Text copyable={{ text: 'Hello, Ant Design!' }}>Replace copy text.</Text>
|
||||
<br />
|
||||
<Text copyable={{ icon: <SmileOutlined /> }}>Custom icon.</Text>
|
||||
<Paragraph editable={{ onChange: this.onChange }}>{this.state.str}</Paragraph>
|
||||
<Paragraph copyable>This is a copyable text.</Paragraph>
|
||||
<Paragraph copyable={{ text: 'Hello, Ant Design!' }}>Replace copy text.</Paragraph>
|
||||
<Paragraph copyable={{ icon: <SmileOutlined /> }}>Custom icon.</Paragraph>
|
||||
<Paragraph copyable={{ tooltips: ['click here', 'you clicked!!'] }}>
|
||||
Replace tooltips text.
|
||||
</Paragraph>
|
||||
|
@ -159,7 +159,7 @@
|
||||
left: -@input-padding-horizontal - 1px;
|
||||
margin-top: -@input-padding-vertical-base - 1px;
|
||||
// stylelint-disable-next-line function-calc-no-invalid
|
||||
margin-bottom: calc(1em - @input-padding-vertical-base - 2px);
|
||||
margin-bottom: calc(1em - @input-padding-vertical-base - 1px);
|
||||
}
|
||||
|
||||
&-confirm {
|
||||
|
Loading…
Reference in New Issue
Block a user