soyjavi / atoms-documentation Goto Github PK
View Code? Open in Web Editor NEWDocumentation for Atoms
Documentation for Atoms
Me he revisado toda la documentación y no queda claro para que sirve establecer el valor del atributo @extends y por qué a veces conviene establecerlo a true
¿Podrías aclararlo? :-)
Cuando creas una nueva clase Atom/Molécula u organismos extiendes de una clase padre.
Ejemplo de Organismo:
class Atoms.Organism.Article extends Atoms.Class.Organism
@template : """<article {{#if.style}}class="{{style}}"{{/if.style}}></article>"""
@available: ["Organism.Header", "Molecule.Search"]
@base : "Article"
@events : ["show", "hide"]
Ejemplo de Molécula:
class Form extends Atoms.Class.Molecule
@template : """<form {{#if.style}}class="{{style}}"{{/if.style}}></form>"""
@available: ["Atom.Label", "Atom.Input", "Atom.Textarea", "Atom.Select", "Atom.Switch", "Atom.Button"]
@events : ["change", "submit", "error"]
@base : "Form"
@defaults :
events: ["submit"]
Ejemplo de Atom:
class Button extends Atoms.Class.Atom
@template : "<button></button>"
@base : "Button"
@events : ["touch"]
En los 3 casos estableces el atributo @base al nombre de la nueva clase.
¿No sería más fácil obviar dicho nombre y hacer que fuera seteado a partir del nombre de la clase?
Supongo que la gracia de que esté presente es que puedas setearlo como otro elemento, pero tiene sentido? Por ejemplo establecer la base de un Button como un elemento Li. ¿?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.