cgkineo / adapt-scrollPrompt

A button which can be appended to menus, pages, blocks and components to aid scrolling
Other
0 stars 0 forks source link

Add option to configure button icon #19

Open swashbuck opened 6 months ago

swashbuck commented 6 months ago

Subject of the enhancement

Currently, the button icon is baked into the less. It would be good to have this as a configurable option named _iconClass.

"_scrollPrompt": {
  "_isEnabled": true,
  "instruction": "Scroll down",
  "_iconClass": "icon-controls-down"
}

The icon class would appear on the .icon element, which also makes it easier when we need to globally replace certain icon types. For example:

.icon-controls-down {
  font-family: 'custom-icon-font';
  .icon-controls-down-custom;
}

While we are making this change, the .icon element should align to other implementations (ex. use a span tag instead of a div).

swashbuck commented 4 months ago

@zubairslamdien Can you take this one on since you're working on #12 ? Thanks!

zubairslamdien commented 4 months ago

That should be fine @swashbuck. I'll try to get to it in the week.