Skip to content

Commit 5b2ed21

Browse files
miguelcobainjayjayjpg
authored andcommitted
Allow docs-hero class to be customizable (#329)
* Allow docs-hero class to be customizable * add class property on docs-hero component * add class customization on demo 2 docs-hero
1 parent 3af6701 commit 5b2ed21

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

addon/components/docs-hero/component.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,13 @@ export default Component.extend({
4444
@argument byline
4545
@type String
4646
*/
47-
byline: projectDescription
47+
byline: projectDescription,
48+
49+
/**
50+
Class to add to the wrapper element
51+
52+
@argument class
53+
@type String
54+
*/
55+
class: null
4856
});

addon/components/docs-hero/template.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<div class='
22
docs-bg-brand docs-text-white
33
docs-px-4 docs-py-16 docs-text-center
4+
{{class}}
45
'>
56
<div class="docs-max-w-sm docs-mx-auto">
67
<h1 class='

tests/dummy/app/pods/docs/components/docs-hero/demo-2/template.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
prefix='EmberData'
55
heading='Something'
66
byline='The best addon ever. Now playing in theaters.'
7+
class='some-custom-class'
78
}}
89
{{/demo.example}}
910

0 commit comments

Comments
 (0)