smooth-code / smooth-ui

Modern React UI library πŸ’…πŸ‘©β€πŸŽ€πŸ­
MIT License
1.59k stars 101 forks source link

Property 'type' does not exist on Button #135

Closed CodingDive closed 5 years ago

CodingDive commented 5 years ago

πŸ› Bug Report

Error when using 'type' property on a smooth-ui styled-components Button component.

Error ``` Type '{ children: string; type: string; }' is not assignable to type 'IntrinsicAttributes & ButtonProps & { children?: reactNode; }'. Property 'type' does not exist on type 'IntrinsicAttributes & ButtonProps & { children?: ReactNode; }' ```

To Reproduce

import { Button } from '@smooth-ui/core-sc';

function SubmitButton() {
  return <Button type="submit">Test</Button>;
}

Expected behavior

No error to be raised

Link to repl or repo

https://codesandbox.io/s/k9479j5mx7

Run npx envinfo --system --binaries --npmPackages @smooth-ui/core-sc,@smooth-ui/core-em,styled-components,@emotion/core,@emotion/styled,emotion-theming --markdown --clipboard

Paste the results here:

## System:
 - OS: Windows 10
 - CPU: (4) x64 Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz
 - Memory: 14.34 GB / 23.94 GB
## Binaries:
 - Node: 11.6.0 - C:\Program Files\nodejs\node.EXE
 - Yarn: 1.15.2 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
 - npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
gregberge commented 5 years ago

Types are no longer part of this library, please add them to https://github.com/DefinitelyTyped/DefinitelyTyped.