Skip to content

Commit

Permalink
fix(component): fixed export name batting
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmen committed May 2, 2021
1 parent 2841752 commit 05ae0b6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
12 changes: 6 additions & 6 deletions src/inputs/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ import {css} from "@emotion/react";
import styled from "@emotion/styled";
import classnames from "classnames";
import React, {FC, InputHTMLAttributes, Ref} from "react";
import {useTheme} from "../hooks/useTheme";
import {ThemeProp} from "../providers/ThemeProvider";
import {useTheme} from "../hooks";
import {ThemeProp} from "../providers";
import {SizeStyles} from "../types/SizeStyles";
import {SizeType} from "../types/SizeType";
import {extractSizeStyle} from "../utils/extractors/extractSizeStyle";
import {classname} from "./InputGroup";
import Color from "color-js/color";

export interface Props extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
size?: SizeType;
/**
* ref
*/
register?: Ref<HTMLInputElement>;
}

export const Input: FC<Props> = ({
export const Input: FC<InputProps> = ({
className,
size = 'normal',
register,
Expand All @@ -29,7 +29,7 @@ export const Input: FC<Props> = ({
};


export const styles: SizeStyles = {
export const inputStyles: SizeStyles = {
normal: css`
height: calc(1rem + .75rem + 2px);
padding: .375rem .5rem;
Expand Down Expand Up @@ -78,4 +78,4 @@ transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
.${classname} > &:not(:last-child) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}`, extractSizeStyle(styles));
}`, extractSizeStyle(inputStyles));
12 changes: 6 additions & 6 deletions src/inputs/InputAddition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ import {css} from "@emotion/react";
import styled from "@emotion/styled";
import classnames from "classnames";
import React, {FC} from "react";
import {useTheme} from "../hooks/useTheme";
import {ThemeProp} from "../providers/ThemeProvider";
import {useTheme} from "../hooks";
import {ThemeProp} from "../providers";
import {SizeType} from "../types/SizeType";
import {StyleProps} from "../types/StyleProps";
import {extractSizeStyle} from "../utils/extractors/extractSizeStyle";
import {styles} from "./Input";
import {inputStyles} from "./Input";
import {classname} from "./InputGroup";

export type Props = {
export type InputAdditionProps = {
size?: SizeType;
} & StyleProps;

export const InputAddition: FC<Props> = ({size = 'normal', className, style, children}) => {
export const InputAddition: FC<InputAdditionProps> = ({size = 'normal', className, style, children}) => {
const theme = useTheme('secondary');
return <Style sizeType={size} className={classnames('actors-input', className)} style={style} theme={theme}>{children}</Style>;
};
Expand All @@ -39,5 +39,5 @@ border: 1px solid ${border};
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
`, extractSizeStyle(styles));
`, extractSizeStyle(inputStyles));

4 changes: 3 additions & 1 deletion src/inputs/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export * from './Input';
export * from './Textarea'
export * from './InputAddition';
export * from './InputGroup';
export * from './Select';
export * from './Textarea'

0 comments on commit 05ae0b6

Please sign in to comment.