Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom capture checkbox #34

Open
SimonLab opened this issue Mar 31, 2020 · 1 comment
Open

Custom capture checkbox #34

SimonLab opened this issue Mar 31, 2020 · 1 comment
Labels
enhancement New feature or request
Projects

Comments

@SimonLab
Copy link
Member

The current checkboxes are defined using the the defaultCheckbox from elm-ui:

image

However it is possible to customise the checkbox via the icon value:
image

So we can try to customise this element to make it a bit more obvious on the page

@SimonLab SimonLab added the enhancement New feature or request label Mar 31, 2020
@SimonLab SimonLab added this to To do in dwyl app via automation Mar 31, 2020
@SimonLab
Copy link
Member Author

SimonLab commented Apr 2, 2020

The icon value for the checkbox is function which takes a boolean (i.e. checked or not checked) and returns an Element msg. This means that we can use any elm-ui element to represent the icon.
For example with a simple text:

iconCheckbox : Bool -> Element Msg
iconCheckbox checked =
    if checked then
        text "x"

    else
        text "-"

image

We can then create or find two svg images to represent the checkboxes to match the UI of the application

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
dwyl app
  
To do (Unprioritized)
Development

No branches or pull requests

1 participant