import React from 'react'

export default function (props) {
  if (!props.create && props.create != null) {
    return <span></span>
  }
  return (
    <div style={{ display: props.show ? 'inherit' : 'none'}}>
      { props.children }
    </div>
  )
}

/*
<Wrap create={false}>
  <p>foo</p>
</Wrap>

<Wrap show={false}>
  <p>foo</p>
</Wrap>
*/
@@ -60,109 +60,650 @@
 %7B%0A  
-if (!props.create && props.create != null) %7B%0A    return %3Cspan%3E%3C/span%3E%0A  %7D%0A  return (%0A    %3Cdiv
+  const isCreate = ('create' in props) ? props.create : 'WRAP_CREATE_UNDEFINED'%0A    const isShow = ('show' in props) ? props.show : 'WRAP_SHOW_UNDEFINED'%0A    const tag = props.tag %7C%7C 'div'%0A    // %E5%AE%9A%E4%B9%89%E4%BA%86create%0A    if (isCreate !== 'WRAP_CREATE_UNDEFINED') %7B%0A        if (!props.create) %7B%0A            return null%0A        %7D else %7B%0A            return (%0A                React.createElement(tag, %7B%0A                    className: props.className %7C%7C ''%0A                %7D, props.children)%0A            )%0A        %7D%0A    %7D else %7B%0A        return (%0A            React.createElement(tag, %7B%0A                className: props.className %7C%7C '',%0A               
  style
-=%7B
+: 
 %7B di
@@ -713,50 +713,50 @@
 ay: 
-props.show ? 'inherit' : 'none'%7D%7D%3E%0A
+getShowStyle(props.show) %7D,%0A      
       
-%7B
+%7D,
  pro
@@ -770,31 +770,182 @@
 dren
- %7D%0A    %3C/div%3E%0A  )%0A%7D%0A%0A/*
+)%0A        )%0A    %7D%0A%7D%0A%0Afunction getShowStyle(show) %7B%0A    if (show === undefined) %7B%0A        return 'inherit'%0A    %7D%0A    return show ? 'inherit' : 'none'%0A%7D%0A%0A/*%0A%E7%B1%BB%E4%BC%BC vue v-if v-show%0A
 %0A%3CWr
@@ -984,17 +984,16 @@
 %3C/Wrap%3E%0A
-%0A
 %3CWrap sh
@@ -994,32 +994,59 @@
 rap show=%7Bfalse%7D
+ className='flex' tag='div'
 %3E%0A  %3Cp%3Efoo%3C/p%3E%0A%3C

update react wrap