Expo+Storybook点击ADDONS按钮报错:CSSStyleDeclaration索引属性设置失败
Storybook点击ADDONS按钮报错:Indexed property setter is not supported
点击Story页面的ADDONS按钮时,出现如下错误:
Failed to set an indexed property on 'CSSStyleDeclaration': Indexed property setter is not supported
已排查确认:移除Button组件的color属性后,一切正常。
使用环境:
- expo SDK 49
- react-native-elements (rneui) 4.0.0-rc.8
- @storybook/react-native 6.5.6
我的Story代码如下:
import React from "react"; import { Button } from "@rneui/themed"; const MyButtonMeta = { title: "MyButton", component: Button, argTypes: { onPress: { action: "pressed the button" }, }, args: { title: "Hello world", color: "error", }, decorators: [(Story) => <Story />], }; export default MyButtonMeta; export const Basic = {}; export const AnotherExample = { args: { title: "Another example", color: "error", }, };
求解决思路,感谢!
内容的提问来源于stack exchange,提问作者Mohammad Reza
相关产品推荐
相关产品推荐

