The effect of the classNames option #646
DenisSvistoplasov
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In simplebar/packages/simplebar README says:
It says that classNames option "change the default class names that SimpleBar uses" but actually it overwrites class names and SimpleBar styles do not affect on those elements any more.
Should it be so, and README may be refined?
Or should classNames option add classes instead of overwrite?
Presumed that only these 4 classes may be overwritten (Should it be explicit said?). But in simplebar/packages/simplebar-core/src/index.ts in type and declaration of defaultOptions.classNames there is neither 'scrollContent' property nor 'content' property ('contentEl' instead). Therefore pointing classes using properties 'scrollContent' or 'content' in the classNames option doesn't have an effect (at least in vanila and react).
In simplebar/packages/simplebar-core/src/index.ts there is an accessing an element via .querySelector(`.${this.classNames.someClass}`) so that assumes that someClass must be a one-word-string without spaces, and it can't be used for passing several classes. Again, either functionality can be expanded or documentation can be refined.
(TS) Can be done a truncated version of the ClassNames type, that would represent the classes of elements which the user can overwrite.
Beta Was this translation helpful? Give feedback.
All reactions