Skip to content

Commit

Permalink
feat(inline-inpouts): add ts type definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
grabkowski committed May 11, 2021
1 parent 9dce2b9 commit bbd8fef
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/inline-inputs/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "./inline-inputs";
19 changes: 19 additions & 0 deletions src/components/inline-inputs/inline-inputs.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import * as React from "react";
import * as OptionsHelper from "../../utils/helpers/options-helper/options-helper";

export interface InlineInputsProps {
/** Children elements */
children?: React.ReactNode;
/** [Legacy prop] A custom class name for the component. */
className?: string;
/** Gutter prop gets passed down to Row component if false gutter value is "none" */
gutter?: "none" | OptionsHelper.SizesFull;
/** The id of the corresponding input control for the label */
htmlFor?: string;
/** Defines the label text for the heading. */
label?: string;
}

declare function InlineInputs(props: InlineInputsProps): JSX.Element;

export default InlineInputs;
9 changes: 9 additions & 0 deletions src/utils/helpers/options-helper/options-helper.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,15 @@ export type SizesType = "small" | "large";

export type SizesRestricted = "small" | "medium" | "large";

export type SizesFull =
| "extra-small"
| "small"
| "medium-small"
| "medium"
| "medium-large"
| "large"
| "extra-large";

export type ThemesBinary = "primary" | "secondary";

export type Positions = "top" | "bottom" | "left" | "right";
Expand Down

0 comments on commit bbd8fef

Please sign in to comment.