Ok, thanks so much for your quick reply @wintry karma, I want to ask a follow-up question so that we don't do the wrong thing here based on your answer. We are trying to style all Input-types and Combobox-types by doing this (minimal example):
const theme = {
components: {
Combobox: Combobox.extend({ vars: (theme, props) => {} }),
Input: Input.extend({ vars: (theme, props) => {} }),
},
};
Those Component.extend() definitions are in separate files, and sometimes we are dynamically constructing the vars object based on props, so we use those types to annotate that vars object, another example:
import { Combobox } from '@mantine/core';
import type { ComboboxCSSVariables } from '@mantine/core/lib/components/Combobox/Combobox';
export const ComboboxExtend = Combobox.extend({
vars: (theme, props) => {
const vars: PartialTransformVars<ComboboxCSSVariables> = {
options: {
},
dropdown: {
},
};
if (someCondition) {
vars.dropdown['--combobox-padding'] = '0';
}
return vars;
},
});
Does this pattern still make sense to you even though we are using that internal ComboboxCSSVariables type?