我正在使用UI Kitten 4.0构建一个登录屏幕,我希望将背景颜色设置为布局组件,使其成为当前主题的主颜色。
这方面的文档没有任何参考,因为它在按钮组件 API页面上。
我想要实现类似于下面的代码。
import React, { Component } from "react"
import { Layout, Text } from "react-native-ui-kitten"
export default class Login extends Component {
render() {
return (
<Layout primary>
<Text>Log in</Text>
</Layout>
)
}
}发布于 2019-08-20 10:12:32
我们还内置了访问主题属性的API。查查小吃
发布于 2019-08-20 08:20:33
<Layout style={{ backgroundColor: 'red' }}>或通过映射定制:https://akveo.github.io/react-native-ui-kitten/docs/design-system/custom-component-mapping#prepare-the-boilerplate直接自定义”样式“样式。https://stackoverflow.com/questions/57560967
复制相似问题