mirror of https://github.com/sveltejs/svelte
[feat] Better error message for inline component style directive (#7187)
Closes #7177pull/7217/head
parent
d35fc9f842
commit
587f94eb65
@ -0,0 +1,9 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"code": "invalid-component-style-directive",
|
||||||
|
"message": "Style directives cannot be used on components",
|
||||||
|
"start": { "line": 7, "column": 19, "character": 97 },
|
||||||
|
"end": { "line": 7, "column": 36, "character": 114 },
|
||||||
|
"pos": 97
|
||||||
|
}
|
||||||
|
]
|
@ -0,0 +1,7 @@
|
|||||||
|
<script>
|
||||||
|
let name = 'world';
|
||||||
|
|
||||||
|
import Child from 'Child.svelte';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<Child name={name} style:color="red" />
|
Loading…
Reference in new issue