Skip to content

Commit a5b1643

Browse files
MachinisteWebchrisvfritz
authored andcommitted
component.md : Component Naming Conventions better consistency (vuejs#903)
* Add french translation link Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com> * kebab-case explaination updates Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com> * kebab-case to kebab-cased Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com> * Remove space before self-closing component
1 parent ea5356a commit a5b1643

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/v2/guide/components.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,25 +1155,25 @@ When using _string_ templates however, we're not bound by HTML's case-insensitiv
11551155

11561156
- kebab-case
11571157
- camelCase or kebab-case if the component has been defined using camelCase
1158-
- kebab-case, camelCase or Title case if the component has been defined using TitleCase
1158+
- kebab-case, camelCase or TitleCase if the component has been defined using TitleCase
11591159

11601160
``` js
11611161
components: {
1162-
'kebab-case-component': { /* ... */ },
1163-
camelCaseComponent: { /* ... */ },
1164-
TitleCaseComponent: { /* ... */ }
1162+
'kebab-cased-component': { /* ... */ },
1163+
camelCasedComponent: { /* ... */ },
1164+
TitleCasedComponent: { /* ... */ }
11651165
}
11661166
```
11671167

11681168
``` html
1169-
<kebab-case-component />
1169+
<kebab-cased-component></kebab-cased-component>
11701170

1171-
<camel-case-component />
1172-
<camelCaseComponent />
1171+
<camel-cased-component></camel-cased-component>
1172+
<camelCasedComponent></camelCasedComponent>
11731173

1174-
<title-case-component />
1175-
<titleCaseComponent />
1176-
<TitleCaseComponent />
1174+
<title-cased-component></title-cased-component>
1175+
<titleCasedComponent></titleCasedComponent>
1176+
<TitleCasedComponent></TitleCasedComponent>
11771177
```
11781178

11791179
This means that the TitleCase is the most universal _declaration convention_ and kebab-case is the most universal _usage convention_.

0 commit comments

Comments
 (0)