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

Document elementClasses use-cases #348

Open
blzaugg opened this issue Jan 25, 2018 · 0 comments
Open

Document elementClasses use-cases #348

blzaugg opened this issue Jan 25, 2018 · 0 comments

Comments

@blzaugg
Copy link
Contributor

blzaugg commented Jan 25, 2018

Migrated: bryceosterhaus/metaljs.com#92

Source:

/**
* CSS classes to be applied to the element.
* @type {string}
*/
elementClasses: {
setter: 'setterElementClassesFn_',
validator: isString,
value: '',
},

Example:

class MyComponent extends Component {
	render() {
		return (
			<div class="foo"></div>
		);
	}
}

<MyComponent elementClasses="bar" />
  
  
// Result
  
<div class="foo bar"></div>
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

No branches or pull requests

1 participant