docs: missing dynamic prop icon, improve some prop docs, change permalink icon

This commit is contained in:
jean-emmanuel 2019-04-08 12:41:49 +02:00
parent 20690b6e75
commit 6fb64c128c
8 changed files with 339 additions and 303 deletions

View file

@ -23,7 +23,7 @@ for (var propName in base) {
if (propName[0] === '_' && propName !== '_props') {
doc.push(`
| <h4 class="thead2" id="${prop}">${prop}<a class="headerlink" href="#${prop}" title="Permanent link"></a></h4> ||||`
| <h4 class="thead2" id="${prop}">${prop}<a class="headerlink" href="#${prop}" title="Permanent link">#</a></h4> ||||`
)
}
@ -34,7 +34,7 @@ for (var propName in base) {
doc.push(`
| <h4 id="${permalink}">${propName}${dynamic}<a class="headerlink" href="#${permalink}" title="Permanent link"></a></h4> | \`${prop.type.replace(/\|/g,'\`\\|<br/>\`')}\` | <code>${(JSON.stringify(prop.value, null, '&nbsp;') || '').replace(/\n/g,'<br/>')}</code> | ${help} |`
| <h4 id="${permalink}">${propName}${dynamic}<a class="headerlink" href="#${permalink}" title="Permanent link">#</a></h4> | \`${prop.type.replace(/\|/g,'\`\\|<br/>\`')}\` | <code>${(JSON.stringify(prop.value, null, '&nbsp;') || '').replace(/\n/g,'<br/>')}</code> | ${help} |`
)
}
@ -70,7 +70,7 @@ for (var k in widgets.categories) {
if (propName[0] === '_' && propName !== '_props') {
if (separator) doc.pop()
doc.push(`
| <h4 class="thead2" id="${type + '_' + prop}">${prop}<a class="headerlink" href="#${type + '_' + prop}" title="Permanent link"></a></h4> ||||`
| <h4 class="thead2" id="${type + '_' + prop}">${prop}<a class="headerlink" href="#${type + '_' + prop}" title="Permanent link">#</a></h4> ||||`
)
separator = true
}
@ -81,7 +81,7 @@ for (var k in widgets.categories) {
dynamic = widgets.widgets[type].dynamicProps.includes(propName) ? '<i class="dynamic-prop-icon" title="dynamic"></i>' : ''
doc.push(`
| <h4 id="${permalink}">${propName}${dynamic}<a class="headerlink" href="#${permalink}" title="Permanent link"></a></h4> | \`${prop.type.replace(/\|/g,'\`\\|<br/>\`')}\` | <code>${(JSON.stringify(prop.value, null, '&nbsp;') || '').replace(/\n/g,'<br/>')}</code> | ${help} |`
| <h4 id="${permalink}">${propName}${dynamic}<a class="headerlink" href="#${permalink}" title="Permanent link">#</a></h4> | \`${prop.type.replace(/\|/g,'\`\\|<br/>\`')}\` | <code>${(JSON.stringify(prop.value, null, '&nbsp;') || '').replace(/\n/g,'<br/>')}</code> | ${help} |`
)
separator = false
}