Skip to content
Snippets Groups Projects
Commit 8913d27c authored by Filipa Lacerda's avatar Filipa Lacerda Committed by Alfredo Sumaran
Browse files

Adds entry about kebab case props in documentation

parent a9b1a85b
No related branches found
No related tags found
No related merge requests found
Loading
@@ -200,7 +200,6 @@ See [our current .eslintrc][eslintrc] for specific rules and patterns.
Loading
@@ -200,7 +200,6 @@ See [our current .eslintrc][eslintrc] for specific rules and patterns.
#### Naming #### Naming
- **Extensions**: Use `.vue` extension for Vue components. - **Extensions**: Use `.vue` extension for Vue components.
- **Reference Naming**: Use PascalCase for Vue components and camelCase for their instances: - **Reference Naming**: Use PascalCase for Vue components and camelCase for their instances:
```javascript ```javascript
// bad // bad
import cardBoard from 'cardBoard'; import cardBoard from 'cardBoard';
Loading
@@ -218,15 +217,23 @@ See [our current .eslintrc][eslintrc] for specific rules and patterns.
Loading
@@ -218,15 +217,23 @@ See [our current .eslintrc][eslintrc] for specific rules and patterns.
cardBoard: CardBoard cardBoard: CardBoard
}; };
``` ```
- **Props Naming**: Avoid using DOM component prop names. - **Props Naming:**
- Avoid using DOM component prop names.
- Use kebab-case instead of camelCase to provide props in templates.
   
```javascript ```javascript
// bad // bad
<component class="btn"> <component class="btn">
   
// good // good
<component cssClass="btn"> <component css-class="btn">
```
// bad
<component myProp="prop" />
// good
<component my-prop="prop" />
```
   
#### Alignment #### Alignment
- Follow these alignment styles for the template method: - Follow these alignment styles for the template method:
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment