We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
style
I am trying to add my own asset package.
Icon register
import React from 'react'; import { Avatar } from '@ui-kitten/components'; const IconProvider = (source) => ({ toReactElement: ({ animation, ...style }) => ( <Avatar style={ style } shape="round" source={ source }/> ), }); export const AssetIconsPack = { name: 'assets', icons: { iconLineChart: IconProvider(require('assets/commonIcons/icon_line_chart.png')), iconCandleChart: IconProvider(require('assets/commonIcons/icon_candle_chart.png')), }, };
using the new icon package
const iconCandleChart = () => ( <Icon name="iconCandleChart" pack="assets" width={ 18 } height={ 18 } /> );
warning
Warning: Failed prop type: Invalid props.style key `style` supplied to `Image`. Bad object: { "borderRadius": 9, "width": 18, "height": 18, "style": [ { "width": 12, "height": 12, "tintColor": "#FF3D71", "marginHorizontal": 6 }, {}, null ] } Valid keys: [ "display", "width", ... ]
Steps to reproduce the behavior:
no warning
npx: installed 1 in 7.037s System: OS: macOS 10.15.4 CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz Binaries: Node: 11.10.1 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.14.4 - /usr/local/bin/npm SDKs: iOS SDK: Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2 Android SDK: API Levels: 23, 25, 26, 27, 28, 29 Build Tools: 23.0.1, 23.0.3, 25.0.2, 25.0.3, 26.0.1, 27.0.3, 28.0.0, 28.0.3, 29.0.0, 29.0.1, 29.0.2 System Images: android-28 | Google APIs Intel x86 Atom IDEs: Android Studio: 3.6 AI-192.7142.36.36.6241897 Xcode: 11.4/11E146 - /usr/bin/xcodebuild
The text was updated successfully, but these errors were encountered:
@SimonHausdorf sorry for the late reply. Just checked this and yes. Sorry for such issue. For v4 you can use:
const IconProvider = (source) => ({ toReactElement: ({ animation, ...props }) => ( <Avatar {...props} source={source} /> ), });
or, if you want modify style somehow:
const IconProvider = (source) => ({ toReactElement: ({ animation, ...props }) => ( <Avatar {...props} style={[props.style, { backgroundColor: props.tintColor }]} source={source} /> ), });
Thanks for reporting 👍
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
🐛 Bug Report
I am trying to add my own asset package.
Icon register
using the new icon package
warning
To Reproduce
Steps to reproduce the behavior:
Expected behavior
no warning
Link to runnable example or repository (highly encouraged)
UI Kitten and Eva version
Environment information
The text was updated successfully, but these errors were encountered: