From 374c37aa15774ef1613a117e2cf62f37568911ce Mon Sep 17 00:00:00 2001 From: Duncan Graham Walker Date: Sun, 22 May 2016 14:06:25 -0400 Subject: [PATCH] Custom spinner component and examples index: --- tests/dummy/app/components/some-spinner.js | 5 ++ tests/dummy/app/styles/app.scss | 16 ++++++- .../app/templates/components/some-spinner.hbs | 3 ++ tests/dummy/app/templates/index.hbs | 47 ++++++++++++------- 4 files changed, 53 insertions(+), 18 deletions(-) create mode 100644 tests/dummy/app/components/some-spinner.js create mode 100644 tests/dummy/app/templates/components/some-spinner.hbs diff --git a/tests/dummy/app/components/some-spinner.js b/tests/dummy/app/components/some-spinner.js new file mode 100644 index 00000000..75ce55a1 --- /dev/null +++ b/tests/dummy/app/components/some-spinner.js @@ -0,0 +1,5 @@ +import Ember from 'ember'; + +export default Ember.Component.extend({ + classNames: ['spinner'], +}); diff --git a/tests/dummy/app/styles/app.scss b/tests/dummy/app/styles/app.scss index df1694fd..fbf688af 100644 --- a/tests/dummy/app/styles/app.scss +++ b/tests/dummy/app/styles/app.scss @@ -100,10 +100,24 @@ input { @include rem(padding, 0.4, 0.6); } +p { + @include rem(margin, 3, 0); +} + +a { + color: $purple; + text-decoration: none; + border-bottom: 1px dotted $purple; +} + +li { + @include rem(padding, 0.4, 0); +} + /* Async spinner */ .spinner { - margin: 5px 0; + margin: 3px 0 5px; width: 70px; text-align: center; } diff --git a/tests/dummy/app/templates/components/some-spinner.hbs b/tests/dummy/app/templates/components/some-spinner.hbs new file mode 100644 index 00000000..91710ce5 --- /dev/null +++ b/tests/dummy/app/templates/components/some-spinner.hbs @@ -0,0 +1,3 @@ +
+
+
diff --git a/tests/dummy/app/templates/index.hbs b/tests/dummy/app/templates/index.hbs index 1e2bb745..1ea9b3f7 100644 --- a/tests/dummy/app/templates/index.hbs +++ b/tests/dummy/app/templates/index.hbs @@ -37,11 +37,25 @@ -
+ +

Examples

-

Basic usage with components

+ +
+ +
+ +

Basic usage with components

{{!-- BEGIN-SNIPPET basic-usage-components --}} {{#some-component}} @@ -58,13 +72,13 @@
-

Basic usage with elements

+

Basic usage with elements

{{!-- BEGIN-SNIPPET basic-usage-elements --}}
- Hover for more info + Click for more info - {{#tooltip-on-element}} + {{#tooltip-on-element event='click'}} Here is the info! {{/tooltip-on-element}}
@@ -75,7 +89,7 @@
-

Using with a target

+

Using with a target

{{!-- BEGIN-SNIPPET basic-usage-target --}} {{input id='my-input' value='Some value'}} @@ -89,7 +103,7 @@
-

Using a delay

+

Using a delay

{{!-- BEGIN-SNIPPET using-with-delay --}} {{#some-component}} @@ -105,7 +119,7 @@
-

Using a duration

+

Using a duration

{{!-- BEGIN-SNIPPET using-with-duration --}} {{#some-component}} @@ -122,7 +136,7 @@
-

With custom styling

+

With custom styling

{{!-- BEGIN-SNIPPET custom-styling --}}