geist-org / geist-ui

A design system for building modern websites and applications.
https://geist-ui.dev
MIT License
4.35k stars 335 forks source link

Typo on Input component's htmlType as hymlType, causing TS compiler to fail. #598

Closed sannajammeh closed 3 years ago

sannajammeh commented 3 years ago

Bug report 🐞

Version & Environment

Expected Behaviour

The Input's attribute htmlType should not be hymlType. Cannot compile if I still wish to have password on my inputs.

Actual results (or Errors)

I got an error:

// TS is happy with this
 <Input icon={<FiLock />} placeholder="p" hymlType="password" scale={1.5} />
// Not this
 <Input icon={<FiLock />} placeholder="p" htmlType="password" scale={1.5} />
sannajammeh commented 3 years ago

Temporary fix until merge.

// geist.d.ts or any declarations file in your project

declare module '@geist-ui/react/dist/input/input-props' {
    export interface Props {
        htmlType?: string;
    }
}
ofekashery commented 3 years ago

Fixed in #599.