import React from 'react';
import './index.scss';
import CodesWrapper from "../CodesWrapper";
import Button from "../../../lib/button";
import {success} from '../../../lib/message';

const Message = () => {
  const onShowMessageHandle = () => {
    success({duration: 4000, content: '恭喜你，更新成功'});
  };
  const messageComponent = (
    <Button onClick={onShowMessageHandle}>Show Message</Button>
  );

  const messageCodes = `
    hi 
  `;
  return (
    <CodesWrapper codes={messageCodes} component={messageComponent} codeHeight={240}/>
  );
};

export default Message;
