Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding docs for the class directive #351

Merged
merged 4 commits into from
Aug 29, 2018
Merged

Adding docs for the class directive #351

merged 4 commits into from
Aug 29, 2018

Conversation

jacwright
Copy link
Contributor

No description provided.

@jacwright
Copy link
Contributor Author

Fixes #350

content/guide/07-element-directives.md Outdated Show resolved Hide resolved
content/guide/07-element-directives.md Outdated Show resolved Hide resolved
content/guide/07-element-directives.md Outdated Show resolved Hide resolved
content/guide/07-element-directives.md Outdated Show resolved Hide resolved
content/guide/07-element-directives.md Outdated Show resolved Hide resolved
content/guide/07-element-directives.md Outdated Show resolved Hide resolved
@Conduitry
Copy link
Member

Thanks for writing some docs to go along with your new feature! I've added a few comments about things I think should be tweaked.

@Cweili
Copy link

Cweili commented Oct 24, 2018

@jacwright

#371

The demo of the shorthand of class binding has "Error compiling component".

Link:

https://svelte.technology/repl?version=2.14.2&demo=bz2ba6

Error:

Computed property name 'is-selected' is invalid — must be a valid identifier such as is_selected
12:     // Because shorthand relfects the var name, you must use component.set({ "is-selected": true }) or use a computed
13:     // property like this. It might be better to avoid shorthand for class names which are not valid variable names.
14:     "is-selected": ({ isSelected }) => isSelected
        ^
15:   }
16: }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants