Skip to content

Commit 055777c

Browse files
committed
fix: change HTMLAttributes to InputHTMLAttributes
1 parent 2f0971a commit 055777c

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

src/components/form/CFormCheck.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { forwardRef, HTMLAttributes, ReactNode } from 'react'
1+
import React, { forwardRef, InputHTMLAttributes, ReactNode } from 'react'
22
import PropTypes from 'prop-types'
33
import classNames from 'classnames'
44

@@ -31,7 +31,7 @@ export type ButtonObject = {
3131
variant?: 'outline' | 'ghost'
3232
}
3333

34-
export interface CFormCheckProps extends HTMLAttributes<HTMLInputElement> {
34+
export interface CFormCheckProps extends InputHTMLAttributes<HTMLInputElement> {
3535
/**
3636
* Create button-like checkboxes and radio buttons. [docs]
3737
*/

src/components/form/CFormInput.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React, { ChangeEventHandler, forwardRef, HTMLAttributes } from 'react'
1+
import React, { ChangeEventHandler, forwardRef, InputHTMLAttributes } from 'react'
22
import PropTypes from 'prop-types'
33
import classNames from 'classnames'
44
// import { CFormLabel } from './CFormLabel'
55

6-
export interface CFormInputProps extends HTMLAttributes<HTMLInputElement> {
6+
export interface CFormInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
77
/**
88
* A string of all className you want applied to the component. [docs]
99
*/

src/components/form/CFormRange.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import React, { ChangeEventHandler, forwardRef, HTMLAttributes } from 'react'
1+
import React, { ChangeEventHandler, forwardRef, InputHTMLAttributes } from 'react'
22
import PropTypes from 'prop-types'
33
import classNames from 'classnames'
44

5-
export interface CFormRangeProps extends HTMLAttributes<HTMLInputElement> {
5+
export interface CFormRangeProps extends InputHTMLAttributes<HTMLInputElement> {
66
/**
77
* A string of all className you want applied to the component. [docs]
88
*/

src/components/form/CFormSelect.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import React, { forwardRef, HTMLAttributes } from 'react'
1+
import React, { forwardRef, InputHTMLAttributes } from 'react'
22
import PropTypes from 'prop-types'
33
import classNames from 'classnames'
44

5-
export interface CFormSelectProps extends HTMLAttributes<HTMLSelectElement> {
5+
export interface CFormSelectProps extends Omit<InputHTMLAttributes<HTMLSelectElement>, 'size'> {
66
/**
77
* A string of all className you want applied to the component. [docs]
88
*/

src/components/form/CFormSwitch.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import React, { forwardRef, HTMLAttributes, ReactNode } from 'react'
1+
import React, { forwardRef, InputHTMLAttributes, ReactNode } from 'react'
22
import PropTypes from 'prop-types'
33
import classNames from 'classnames'
44

55
import { CFormLabel } from './CFormLabel'
66

7-
export interface CFormSwitchProps extends HTMLAttributes<HTMLInputElement> {
7+
export interface CFormSwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
88
/**
99
* A string of all className you want applied to the component. [docs]
1010
*/

src/components/form/CFormTextarea.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import React, { ChangeEventHandler, forwardRef, HTMLAttributes } from 'react'
1+
import React, { ChangeEventHandler, forwardRef, InputHTMLAttributes } from 'react'
22
import PropTypes from 'prop-types'
33
import classNames from 'classnames'
44

5-
export interface CFormTextareaProps extends HTMLAttributes<HTMLTextAreaElement> {
5+
export interface CFormTextareaProps extends InputHTMLAttributes<HTMLTextAreaElement> {
66
/**
77
* A string of all className you want applied to the component. [docs]
88
*/
@@ -20,7 +20,7 @@ export interface CFormTextareaProps extends HTMLAttributes<HTMLTextAreaElement>
2020
*/
2121
onChange?: ChangeEventHandler<HTMLTextAreaElement>
2222
/**
23-
* Render the component styled as plain text. Removes the default form field styling and preserve the correct margin and padding. Recommend to use only along side `readonly` [docs]
23+
* Render the component styled as plain text. Removes the default form field styling and preserve the correct margin and padding. Recommend to use only along side `readonly`. [docs]
2424
*/
2525
plainText?: boolean
2626
/**

0 commit comments

Comments
 (0)