Skip to content

Commit

Permalink
Rename IInputComponentElement to InputComponentElement, fix link on s…
Browse files Browse the repository at this point in the history
…tory
  • Loading branch information
cgero-eth committed Jan 29, 2024
1 parent 5e1f286 commit a9c8855
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/components/input/hooks/useInputProps.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import classNames from 'classnames';
import { useEffect, useId, useState, type ChangeEvent, type InputHTMLAttributes } from 'react';
import type { IInputComponentElement, IInputComponentProps, IInputContainerProps } from '../inputContainer';
import type { IInputComponentProps, IInputContainerProps, InputComponentElement } from '../inputContainer';

export interface IUseInputPropsResult<TElement extends IInputComponentElement> {
export interface IUseInputPropsResult<TElement extends InputComponentElement> {
/**
* Properties for the InputContainer component.
*/
Expand All @@ -18,7 +18,7 @@ export interface IUseInputPropsResult<TElement extends IInputComponentElement> {
* @param props The InputComponent properties
* @returns The InputContainer and input element properties.
*/
export const useInputProps = <TElement extends IInputComponentElement>(
export const useInputProps = <TElement extends InputComponentElement>(
props: IInputComponentProps<TElement>,
): IUseInputPropsResult<TElement> => {
const {
Expand Down
2 changes: 1 addition & 1 deletion src/components/input/inputContainer/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export { InputContainer } from './inputContainer';
export type {
IInputComponentElement,
IInputComponentProps,
IInputContainerProps,
InputComponentElement,
InputVariant,
} from './inputContainer.api';
4 changes: 2 additions & 2 deletions src/components/input/inputContainer/inputContainer.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ export interface IInputContainerBaseProps {

export interface IInputContainerProps extends IInputContainerBaseProps, Omit<ComponentPropsWithRef<'div'>, 'id'> {}

export type IInputComponentElement = HTMLInputElement | HTMLTextAreaElement;
export type InputComponentElement = HTMLInputElement | HTMLTextAreaElement;

export interface IInputComponentProps<TElement extends IInputComponentElement = HTMLInputElement>
export interface IInputComponentProps<TElement extends InputComponentElement = HTMLInputElement>
extends Omit<IInputContainerBaseProps, 'children' | 'id' | 'inputLength'>,
Omit<InputHTMLAttributes<TElement>, 'type'> {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const Default: Story = {

const ControlledComponent = (props: ITextAreaRichTextProps) => {
const [value, setValue] = useState(
'<p>Hello <strong>dev</strong>, check this <a href="http://google.com" target="_blank">link</a>.</p>',
'<p>Hello <strong>dev</strong>, check this <a href="https://aragon.org" target="_blank">link</a>.</p>',
);

return <TextAreaRichText value={value} onChange={setValue} {...props} />;
Expand Down

0 comments on commit a9c8855

Please sign in to comment.