Skip to content

Commit 5206745

Browse files
betocantu93jenweber
authored andcommitted
ember-learn#588 components/arguments-and-attributes (ember-learn#604)
* Refactor MU filenames * add dots for easier reading
1 parent 48ef62c commit 5206745

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

guides/release/components/arguments-and-attributes.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ component, we can pass a `@content` argument to it like so:
3232

3333
And then we can access it in the template for the `Tooltip` component like this:
3434

35-
```handlebars {data-filename=src/ui/components/tooltip/template.hbs}
35+
```handlebars {data-filename=app/templates/components/tooltip.hbs}
3636
{{@content}}
3737
```
3838

@@ -41,7 +41,7 @@ an argument coming from the caller whenever you're looking at the template. In
4141
the component class you can access the arguments on the `args` property of the
4242
class, since `@` is special character in JavaScript reserved for decorators:
4343

44-
```js {data-filename=src/ui/components/tooltip/component.js}
44+
```js {data-filename=app/components/tooltip.js}
4545
export default class Tooltip extends Component {
4646
get upperCased() {
4747
return this.args.content.toUpperCase();
@@ -112,7 +112,7 @@ provided.
112112
For instance, if you wanted to create a tooltip icon that had a standard icon
113113
and class, you could do it like so:
114114

115-
```javascript {data-filename=src/ui/components/tooltip/component.js}
115+
```javascript {data-filename=app/components/tooltip.js}
116116
import Component from '@glimmer/component';
117117

118118
export default class Tooltip extends Component {
@@ -126,7 +126,7 @@ export default class Tooltip extends Component {
126126
}
127127
```
128128

129-
```handlebars {data-filename=src/ui/components/tooltip/template.hbs}
129+
```handlebars {data-filename=app/templates/components/tooltip.hbs}
130130
<div class="{{this.tooltipClass}}">
131131
<i class="{{this.icon}}"></i>
132132
{{@content}}
@@ -167,7 +167,7 @@ customization logic to every single component.
167167
For instance, in our `<Tooltip>` component from above, instead of adding the
168168
`@tooltipClass` argument, we could use attributes:
169169

170-
```handlebars {data-filename=src/ui/components/tooltip/template.hbs}
170+
```handlebars {data-filename=app/templates/components/tooltip.hbs}
171171
<div class="tooltip" ...attributes>
172172
<i class="{{this.icon}}"></i>
173173
{{@content}}
@@ -224,6 +224,7 @@ can be overriden, but attributes that come _after_ cannot:
224224
...attributes
225225
data-non-overridable="but you can't override me!"
226226
>
227+
...
227228
</p>
228229
```
229230

0 commit comments

Comments
 (0)