Closed devlinjunker closed 4 years ago
Handlebars may not be great for this interactive user interface component use case....
From the handlebars docs: https://handlebarsjs.com/installation/when-to-use-handlebars.html
seems like ember uses handlebars templates: https://guides.emberjs.com/v3.3.0/templates/handlebars-basics/
It was on the list of event based frameworks (in prev comment) and also was mentioned when researching logical helpers (eq, noteq etc..): https://github.com/jmurphyau/ember-truth-helpers
sizing seems complicated... if we add size
property we also need to add https://github.com/jmurphyau/ember-truth-helpers to handlebars so we can check if size == 'sm'
etc...
Need to think about:
.checkbox-label
css class?)sizing seems complicated... if we add
size
property we also need to add https://github.com/jmurphyau/ember-truth-helpers to handlebars so we can check ifsize == 'sm'
etc...
I was able to do this with a simple {{#if size}} ... {{/if}}
check for both size = sm
and lg
Description
Started messing around with simple handlebars partials and helpers.
Added (checkbox) partial with:
Also needed to add new handlebar helper for handling default values, this lets us stylize the checkbox using basic black/white unless the dev adds custom styles with
color
andbg-color
paramsRelated
11
12
Visual
small checkbox:![Screenshot 2020-05-16 11 34 09](https://user-images.githubusercontent.com/1504590/82127543-413b7f80-9769-11ea-9698-8f3a2779d87d.png)
Questions
set style based on app defaults instead of making the dev specify each timesee https://github.com/devlinjunker/template.webpack.fend/issues/24size
property on checkbox partialTODO