From dc3f47b0e8ff48e6a723a9fe61cc2afff79cb882 Mon Sep 17 00:00:00 2001 From: Albert Andrejev Date: Wed, 19 Feb 2020 23:34:28 +0200 Subject: [PATCH] Add typescirpt definitions --- .../types/components/ActionMenu/index.d.ts | 10 ++++++++++ packages/medulas-react-components/types/index.d.ts | 3 +++ 2 files changed, 13 insertions(+) create mode 100644 packages/medulas-react-components/types/components/ActionMenu/index.d.ts diff --git a/packages/medulas-react-components/types/components/ActionMenu/index.d.ts b/packages/medulas-react-components/types/components/ActionMenu/index.d.ts new file mode 100644 index 000000000..b02e1c59b --- /dev/null +++ b/packages/medulas-react-components/types/components/ActionMenu/index.d.ts @@ -0,0 +1,10 @@ +import * as React from "react"; +export interface ActionMenuItem { + readonly title: string; + readonly action: () => void; +} +interface Props { + readonly menuItems: readonly ActionMenuItem[]; +} +declare const ActionMenu: React.FunctionComponent; +export default ActionMenu; diff --git a/packages/medulas-react-components/types/index.d.ts b/packages/medulas-react-components/types/index.d.ts index 5ecadcad4..532165e77 100644 --- a/packages/medulas-react-components/types/index.d.ts +++ b/packages/medulas-react-components/types/index.d.ts @@ -1,3 +1,4 @@ +import ActionMenu, { ActionMenuItem } from "./components/ActionMenu"; import Avatar from "./components/Avatar"; import Badge from "./components/Badge"; import Block from "./components/Block"; @@ -48,6 +49,8 @@ export { } from "./utils/forms/validators"; export { Storybook } from "./utils/storybook"; export { + ActionMenu, + ActionMenuItem, Avatar, Back, Badge,