From e70fe61d281edf424a76eb56c1abd99978b11b9f Mon Sep 17 00:00:00 2001 From: matthewbryant95 <34583553+matthewbryant95@users.noreply.github.com> Date: Tue, 15 Oct 2019 23:18:16 +0100 Subject: [PATCH] Add type declarations for @hig/button (#39106) * Add typedefs for @hig/button * LF -> CRLF * Add TypeScript version * Update TS version to 3.0 for 'unknown' * Turn off automatic exporting --- types/hig__button/hig__button-tests.tsx | 61 +++++++++++++++++++ types/hig__button/index.d.ts | 79 +++++++++++++++++++++++++ types/hig__button/tsconfig.json | 20 +++++++ types/hig__button/tslint.json | 1 + 4 files changed, 161 insertions(+) create mode 100644 types/hig__button/hig__button-tests.tsx create mode 100644 types/hig__button/index.d.ts create mode 100644 types/hig__button/tsconfig.json create mode 100644 types/hig__button/tslint.json diff --git a/types/hig__button/hig__button-tests.tsx b/types/hig__button/hig__button-tests.tsx new file mode 100644 index 0000000000..2b4adb5da0 --- /dev/null +++ b/types/hig__button/hig__button-tests.tsx @@ -0,0 +1,61 @@ +import * as React from 'react'; +import Button, { targets, types, widths, AvailableTargets, AvailableTypes, AvailableWidths } from '@hig/button'; + +/** Button */ +const emptyFunc = () => {}; +const disabled = true; +const icon =
; +const link = ''; +const onClick = emptyFunc; +const onBlur = emptyFunc; +const onFocus = emptyFunc; +const onHover = emptyFunc; +const onMouseDown = emptyFunc; +const onMouseEnter = emptyFunc; +const onMouseLeave = emptyFunc; +const onMouseUp = emptyFunc; +const stylesheet = emptyFunc; +const target = targets.BLANK; +const title = ''; +const type = types.FLAT; +const width = widths.GROW; + +// Minimal props +