import React from 'react'
import { Button, Space } from 'antd'
import styles from './DemoButton.module.less'

interface DemoButtonProps {
  text?: string
  onClick?: () => void
}

const DemoButton: React.FC<DemoButtonProps> = ({
  text = '示例按钮',
  onClick
}) => {
  return (
    <div className={styles.container}>
      <Space direction="vertical" style={{ width: '100%' }}>
        <Button type="primary" block onClick={onClick}>
          {text} - Primary
        </Button>
        <Button type="default" block onClick={onClick}>
          {text} - Default
        </Button>
        <Button type="dashed" block onClick={onClick}>
          {text} - Dashed
        </Button>
        <Button type="primary" danger block onClick={onClick}>
          {text} - Danger
        </Button>
      </Space>
    </div>
  )
}

export default DemoButton
