clockface icon indicating copy to clipboard operation
clockface copied to clipboard

Improve className typing

Open alexpaxton opened this issue 6 years ago • 0 comments

Currently all components have className typed as string | undefined since it is an optional prop with no default. To deal with this we are coercing className to be strict string via: [`${className}`]: className

the classnames library can print the value of className like so: [className]: className however it requires that className be strictly string type to use that syntax.

If we change className to not be optional and have a default value of '' the type would be just string and we could use the simpler syntax in classnames function calls

alexpaxton avatar May 14 '19 18:05 alexpaxton