Skip to content

Commit f21ddab

Browse files
committed
sudheerj#37 syntax-highlighting
1 parent 8f7b02d commit f21ddab

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,14 +1187,15 @@ List of 300 VueJS Interview Questions
11871187
A non-prop attribute is an attribute that is passed to a component, but does not have a corresponding prop defined.
11881188

11891189
For example, If you are using a 3rd-party custom-input component that requires a `data-tooltip` attribute on the input then you can add this attribute to component instance,
1190-
```javascript
1190+
```vue
11911191
<custom-input data-tooltip="Enter your input" />
11921192
```
11931193
If you try to pass the props from parent component the child props with the same names will be overridden. But props like `class` and `style` are exception to this, these values will be merged in the child component.
1194-
```javascript
1195-
//Child component
1194+
```vue
1195+
<!-- Child component -->
11961196
<input type="date" class="date-control">
1197-
//Parent component
1197+
1198+
<!-- Parent component -->
11981199
<custom-input class="custom-class" />
11991200
```
12001201

0 commit comments

Comments
 (0)