hydrogenjs / hydrogen

🎈 Hydrogen. Voted (by me) the world's lightest static-site generator built with TypeScript ❤ It uses 🔥 lit-html inspired templating for super duper performant template generation.
https://hydrogen-js.netlify.app/
MIT License
167 stars 9 forks source link

Components #56

Open shailen-naidoo opened 4 years ago

shailen-naidoo commented 4 years ago
const Tooltip = ({ dev }, text) => `
  <tooltip>
    <p>${text}</p>
  </tooltip>
` 
const { Tooltip } = require('./components')

module.exports = {
  Tooltip
}
module.exports = ({ components }) => `
<html>
  <body>
    ${components.Tooltip('Hello World')}
  </body>
</html>
`
lightningspirit commented 4 years ago

This would be extremely fantastic to have.

shailen-naidoo commented 3 years ago

@lightningspirit I will see if I have the time to implement it :)

shailen-naidoo commented 1 year ago

@lightningspirit Are you still using this library?