From c7af1f2b15637014a270ba17331b4dee3feb0f42 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Wed, 10 May 2017 09:12:20 -0700 Subject: [PATCH] Adding check-box component (#11550) * Adding selectable-row component * Adding example usage to testbed * Using shorthand property name * No need for transclusion * Renaming selectable-row to check-box * Resetting testbed code --- src/ui/public/check_box/check_box.html | 6 ++++++ src/ui/public/check_box/check_box.js | 21 +++++++++++++++++++++ src/ui/public/check_box/index.js | 1 + 3 files changed, 28 insertions(+) create mode 100644 src/ui/public/check_box/check_box.html create mode 100644 src/ui/public/check_box/check_box.js create mode 100644 src/ui/public/check_box/index.js diff --git a/src/ui/public/check_box/check_box.html b/src/ui/public/check_box/check_box.html new file mode 100644 index 00000000000000..a9c7e904c5aa6b --- /dev/null +++ b/src/ui/public/check_box/check_box.html @@ -0,0 +1,6 @@ + diff --git a/src/ui/public/check_box/check_box.js b/src/ui/public/check_box/check_box.js new file mode 100644 index 00000000000000..2048622dcf1aae --- /dev/null +++ b/src/ui/public/check_box/check_box.js @@ -0,0 +1,21 @@ +import { uiModules } from 'ui/modules'; +import template from './check_box.html'; + +const app = uiModules.get('kibana'); + +app.directive('checkBox', function () { + return { + restrict: 'E', + replace: true, + template, + scope: { + id: '=', + isSelected: '=', + onSelectChange: '=', + }, + controllerAs: 'checkBox', + bindToController: true, + controller: class CheckBoxController { + } + }; +}); diff --git a/src/ui/public/check_box/index.js b/src/ui/public/check_box/index.js new file mode 100644 index 00000000000000..54c21f29fb655d --- /dev/null +++ b/src/ui/public/check_box/index.js @@ -0,0 +1 @@ +import './check_box';