klippy
klippy copied to clipboard
Adding a `size` parameter to `klippy()`, solving #18 and #27
@RLesur Thanks for this very nice package! It is very useful, but the klippy button is a bit small compared to my taste (as in #18, #27) .
This PR adds a new parameter size
(in pixels) to the function klippy()
, allowing the user to customize the size (by changing the width) of the button. By default, this size is set to NULL
and the (existing) automatic default is used instead.
In the klippy.js
file, there is a function autoSize
that computes the size of the klippy icon based on the left- or right-padding of the parent. This commit adjusts automatically this padding and therefore the size of the icon, from a size
parameter given by the user.