atom / etch

Builds components using a simple and explicit API around virtual-dom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to pass attribute for element without value?

ivankravets opened this issue · comments

Hi,

I tried different options but without success. An Atom's Text Editor has mini attribute. What is a correct syntax to set it? I use

<atom-text-editor mini={true}>Hello</atom-text-editor>

Thanks.

You should be able to instantiate an editor directly via its constructor in your JSX rather than via that tag name. Do something like this...

// in your imports section
import {TextEditor} from 'atom'

// in your JSX
<TextEditor mini={true} =>

Thanks a lot! It works.