Skip to content

How to use classname on GridList to style it? #5935

Answered by snowystinger
elVengador asked this question in Q&A
Discussion options

You must be logged in to vote

It depends on what you're trying to do. The easiest way would probably be to simplify the accepted types

interface MyInterface extends Omit<GridListProps<T>, 'className'> {
  className?: string
}

Then you don't need to account for people passing in a function. You would still be able to use the function internally though. And since it just returns a string, you can append the props.className to it.

Otherwise, you'd need to chain their call in conditionally and pass it the renderProp argument with as much or as little of those values exposed as well.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@elVengador
Comment options

Answer selected by elVengador
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants