x-tag / core

The Heart of X-Tag
http://x-tag.github.io/
Other
1.25k stars 151 forks source link

experimenting with type renders #192

Closed ghost closed 6 years ago

ghost commented 6 years ago

Using the template api to create type sensitive renders of different components. An example is below:

<x-line type="ratio/output"></x-line>
  <x-key>key</x-key>
  <x-text>value</x-text>
</x-line>

would produce:

<x-line type="ratio/output"></x-line>
  <x-key>key</x-key>
  <x-text>value</x-text>
  <x-toggle>+</x-toggle>
  <x-toggle>-</x-toggle>
</x-line>

This would be great to get components that work like the input elements and would add another good feature to v2