i have problem in stylex, when i use stylex.props for call function, get this error: TypeError: app_site_components_home_megaMenu_styled__WEBPACK_IMPORTED_MODULE_8_.styles.bar is not a function
import * as stylex from "@stylexjs/stylex";
export const styles = stylex.create({
container: {
...theme.row,
boxShadow:'0 5px 15px rgba(0, 0, 0, 0.06)',
padding:'16px 16px',
borderRadius:16,
marginBottom:32,
},
bar: (height) => ({
height,
// The function body must be an object literal
// -- { return {} } is not allowed
}),
});
<div {...stylex.props(styles.container)}>
<div {...stylex.props(styles.bar(20))} >new products</div>
</div>
i have problem in stylex, when i use stylex.props for call function, get this error: TypeError: app_site_components_home_megaMenu_styled__WEBPACK_IMPORTED_MODULE_8_.styles.bar is not a function