ClassQL
DOM manipulation using document queries. Uses DOMQL API.
Installation
yarn add classql
Examples
Initialization:
import DOM from '@rackai/classql'
DOM.query({
logo: { query: '.logo' }
})
Attributes:
DOM.query({
modal: {
query: '.modal',
style: { display: 'none' }
}
})
Events and update:
DOM.query({
CTA: {
query: '.button',
on: {
click: (event, element, node) => {
DOM.find('modal').update({
style: { display: 'block' }
})
}
}
}
})