Shmew / Feliz.MaterialUI

Feliz-style Fable bindings for Material-UI
https://shmew.github.io/Feliz.MaterialUI/
MIT License
70 stars 19 forks source link

Review: ParamArray props #13

Closed cmeeren closed 5 years ago

cmeeren commented 5 years ago

I have implemented some props using ParamArray where I think it's likely that users might want to use a statically defined list of values. Examples:

tablePagination.rowsPerPageOptions

https://github.com/cmeeren/Feliz.MaterialUI/blob/adb43cba1d6b9aea2153da32a9987d608159ed92/src/Feliz.MaterialUI/Props.fs#L4709

Usage:

tablePagination.rowsPerPageOptions(5, 10, 20, 50, 100)

hidden.only

https://github.com/cmeeren/Feliz.MaterialUI/blob/adb43cba1d6b9aea2153da32a9987d608159ed92/src/Feliz.MaterialUI/Props.fs#L1937

Usage:

hidden.only(BreakpointKey.Xs, BreakpointKey.Sm)

There are currently no extra overloads for these props (i.e., no list overloads).

Does the design seem sound?

Zaid-Ajaj commented 5 years ago

These look good! Though it would be nice to add list overloads but again, in the early versions you could try only these out and see what users think

cmeeren commented 5 years ago

Thanks! As you say, I'll wait with list overloads until someone actually requests them.