-
-
Notifications
You must be signed in to change notification settings - Fork 141
Expand file tree
/
Copy pathindex.js
More file actions
58 lines (49 loc) · 1.16 KB
/
index.js
File metadata and controls
58 lines (49 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import Component from '@glimmer/component';
import {
addonPrefix,
unprefixedAddonName,
} from 'ember-cli-addon-docs/utils/computed';
import { classify } from '../../utils/string';
import { addonDocsConfig } from 'ember-cli-addon-docs/-private/config';
/**
A component that renders a hero banner. Useful for your docs site's homepage.
```hbs
<DocsHero
@prefix="Ember"
@heading="SuperAddon"
@byline="The best addon ever. Now playing in theaters."
/>
```
@class DocsHero
@public
*/
export default class DocsHeroComponent extends Component {
@addonDocsConfig config;
/**
The prefix to show, typically of: 'Ember', 'EmberCLI', or 'EmberData'
@argument prefix
@type String
*/
get prefix() {
return this.args.prefix ?? addonPrefix(this.config.projectName);
}
/**
The logo's main heading
@argument heading
@type String
*/
get heading() {
return (
this.args.heading ??
classify(unprefixedAddonName(this.config.projectName))
);
}
/**
Byline for the logo
@argument byline
@type String
*/
get byline() {
return this.args.byline ?? this.config.projectDescription;
}
}