Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[message] 未导出props类型定义 #971

Closed
albyben opened this issue Nov 27, 2024 · 0 comments
Closed

[message] 未导出props类型定义 #971

albyben opened this issue Nov 27, 2024 · 0 comments
Assignees
Labels
bug Something isn't working typescript

Comments

@albyben
Copy link
Collaborator

albyben commented Nov 27, 2024

重现链接或代码

import React from 'react'
import ReactDOM from 'react-dom'
import { Button, Message, Icon } from '@kdcloudjs/kdesign'
import type { IMessageProps } from '@kdcloudjs/kdesign'

const Demo: React.FC = () => {
  const openConfig: IMessageProps = {
    content: 'this is a base',
    closable: true,
    duration: 0
  }
  const successConfig: IMessageProps = {
    content: <div>this is a jsx success</div>,
    closable: true,
    icon: <Icon type="user-info" />,
    duration: 0
  }
  const warningConfig: IMessageProps = {
    content: 'this is a warning',
    icon: ''
  }
  const errorConfig: IMessageProps = {
    content: 'this is a error',
    closable: true
  }
  const base = () => {
    Message.open(openConfig)
  }
  const success = () => {
    Message.success(successConfig)
  }
  const warning = () => {
    Message.warning(warningConfig)
  }
  const error = () => {
    Message.error(errorConfig)
  }
  return (
    <div>
      <Button
        style={{
          marginRight: '12px'
        }}
        onClick={base}>
        base
      </Button>
      <Button
        style={{
          marginRight: '12px'
        }}
        onClick={success}>
        success
      </Button>
      <Button
        style={{
          marginRight: '12px'
        }}
        onClick={warning}>
        warning
      </Button>
      <Button
        style={{
          marginRight: '12px'
        }}
        onClick={error}>
        error
      </Button>
    </div>
  )
}

ReactDOM.render(<Demo />, mountNode)

重现问题步骤

import type { IMessageProps } from '@kdcloudjs/kdesign'

期望的结果是什么

实际的结果是什么

组件库版本号、浏览器信息

组件库与浏览器均为最新版本

@albyben albyben added the bug Something isn't working label Nov 27, 2024
@albyben albyben self-assigned this Nov 27, 2024
albyben pushed a commit to albyben/kdesign that referenced this issue Nov 27, 2024
albyben pushed a commit to albyben/kdesign that referenced this issue Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working typescript
Projects
None yet
Development

No branches or pull requests

1 participant