From 3600064ac87beeccb3c4abd8f1c5b740cda0aed8 Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Sun, 22 Mar 2020 19:21:08 +0100 Subject: Add blueprint externals and migrate --- sw-ui-kt/src/main/kotlin/blueprintjs.kt | 260 ++++++++++++++++++++++++++++++++ 1 file changed, 260 insertions(+) create mode 100644 sw-ui-kt/src/main/kotlin/blueprintjs.kt (limited to 'sw-ui-kt/src/main/kotlin/blueprintjs.kt') diff --git a/sw-ui-kt/src/main/kotlin/blueprintjs.kt b/sw-ui-kt/src/main/kotlin/blueprintjs.kt new file mode 100644 index 00000000..37892fde --- /dev/null +++ b/sw-ui-kt/src/main/kotlin/blueprintjs.kt @@ -0,0 +1,260 @@ +@file:JsModule("@blueprintjs/core") +package com.palantir.blueprintjs + +import org.w3c.dom.HTMLAnchorElement +import org.w3c.dom.HTMLButtonElement +import org.w3c.dom.HTMLElement +import org.w3c.dom.HTMLInputElement +import org.w3c.dom.events.Event +import org.w3c.dom.events.MouseEvent +import react.* + +/** + * The four basic intents. + */ +// export declare const Intent: { +// NONE: "none"; +// PRIMARY: "primary"; +// SUCCESS: "success"; +// WARNING: "warning"; +// DANGER: "danger"; +//}; +//export declare type Intent = typeof Intent[keyof typeof Intent]; +external enum class Intent { + NONE, + PRIMARY, + SUCCESS, + WARNING, + DANGER +} + +/** Alignment along the horizontal axis. */ +//export declare const Alignment: { +// CENTER: "center"; +// LEFT: "left"; +// RIGHT: "right"; +//}; +//export declare type Alignment = typeof Alignment[keyof typeof Alignment]; +external enum class Alignment { + CENTER, + LEFT, + RIGHT +} + +/** + * A shared base interface for all Blueprint component props. + */ +external interface IProps : RProps { + /** A space-delimited list of class names to pass along to a child element. */ + var className: String? +} +external interface IIntentProps { + /** Visual intent color to apply to element. */ + var intent: Intent? +} +/** + * Interface for a clickable action, such as a button or menu item. + * These props can be spready directly to a `