mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 05:29:37 +08:00
fix test error
This commit is contained in:
parent
f8dc201218
commit
c43f6c0f25
@ -17,8 +17,10 @@ A basic comment with author, avatar, time and actions.
|
||||
import React, { createElement, useState } from 'react';
|
||||
import { Comment, Tooltip, Avatar } from 'antd';
|
||||
import dayjs from 'dayjs';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
import { DislikeOutlined, LikeOutlined, DislikeFilled, LikeFilled } from '@ant-design/icons';
|
||||
|
||||
dayjs.extend(relativeTime);
|
||||
const Demo = () => {
|
||||
const [likes, setLikes] = useState(0);
|
||||
const [dislikes, setDislikes] = useState(0);
|
||||
|
@ -16,7 +16,9 @@ Displaying a series of comments using the `antd` List Component.
|
||||
```jsx
|
||||
import { Comment, Tooltip, List } from 'antd';
|
||||
import dayjs from 'dayjs';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
|
||||
dayjs.extend(relativeTime);
|
||||
const data = [
|
||||
{
|
||||
actions: [<span key="comment-list-reply-to-0">Reply to</span>],
|
||||
|
Loading…
Reference in New Issue
Block a user