Variantsinterface
{
readonly [key: string]: boolean;
}Dictionary of boolean variant flags whose true-valued keys become class names.
trueorfalseitem values in dictionaries use the stringkeyof the item if the value istrue, or ignore it if the value is falsy.- Anything that is not
truehas no effect, so other values can be passed in and will be ignored. This means you can pass the entirepropsinto this and it'll work just fine.
Typed as object (not Data/Record<string, unknown>) so plain interface types are accepted —
interfaces lack an implicit string index signature, so they don't satisfy index-signature types.