While using inner labels (onLabel and offLabel) for the Switch component, I noticed that text was often moved further out of frame the longer it was, and that the size of font was unsuitable for emojies:
To fix this I added a new property to override onLabel and offLabel sizes called innerLabelSize. I also changed the onLabel CSS from transform: translateX(-200%) to left: 10% which mirrors the offLabel CSS of right: 10%.
Would love some feedback as my first contribution to this repo. Not too fussed if it's not suitable; it fixes my issue and thought I would share.
Before submitting the PR, please make sure you do the following
Description
While using inner labels (
onLabel
andoffLabel
) for the Switch component, I noticed that text was often moved further out of frame the longer it was, and that the size of font was unsuitable for emojies:To fix this I added a new property to override
onLabel
andoffLabel
sizes calledinnerLabelSize
. I also changed theonLabel
CSS fromtransform: translateX(-200%)
toleft: 10%
which mirrors theoffLabel
CSS ofright: 10%
.Would love some feedback as my first contribution to this repo. Not too fussed if it's not suitable; it fixes my issue and thought I would share.
Before submitting the PR, please make sure you do the following
[@svelteui/core]
,[@svelteui/actions]
,[@svelteui/motion]
,[@svelteui/core]
,[core]
, or[docs]
.yarn lint
andyarn test
or just runyarn prepush
.