-
-
Notifications
You must be signed in to change notification settings - Fork 170
Closed
Description
I try to set custom width and height but it seems like these props are ignored. Am I doing it wrong?
QuarkPlayer on master [!] is 📦 v1.0.0 via ⬢ v12.13.0
❯ yarn start
yarn run v1.19.1
$ qode --inspect ./dist/index.js
Debugger listening on ws://127.0.0.1:9229/782a4de1-09c1-45b1-9e31-c1bba1328b18
For help, see: https://nodejs.org/en/docs/inspector
[2019-11-19 13:51:42.230] [info] EventWidget: subscribed to Resize : 14, size: 1
[2019-11-19 13:51:42.235] [info] flexlayout: count 0
[2019-11-19 13:51:42.238] [info] flexlayout: count 0
[2019-11-19 13:51:42.242] [info] flexlayout: count 0
[2019-11-19 13:51:42.243] [info] flexlayout: count 0
Could not parse stylesheet of object NWidget(0x31435c0)
[2019-11-19 13:51:42.302] [info] set border: nan
Could not parse stylesheet of object NWidget(0x31435c0)
[2019-11-19 13:51:42.304] [info] set border: nan
[2019-11-19 13:51:42.304] [info] set alignItems: center
[2019-11-19 13:51:42.304] [info] set flex: 1
[2019-11-19 13:51:42.304] [info] set alignItems: center
[2019-11-19 13:51:42.304] [info] set flex: 1
[2019-11-19 13:51:42.304] [info] set yWidth: 100%
[2019-11-19 13:51:42.304] [info] set yHeight: 100%
Done in 3.42s.
Here's the code:
import React from 'react'
import { Image, View } from '@nodegui/react-nodegui'
import { AspectRatioMode } from '@nodegui/nodegui'
type ImageProps = {
src: string
}
const coverStyle = `
flex: 2;
#img {
flex: 1;
height: '40px';
width: '40px';
qproperty-alignment: 'AlignCenter';
}
`
const Cover = ({ src }: ImageProps) => (
<View styleSheet={coverStyle}>
<Image
id="img"
src={src}
aspectRatioMode={AspectRatioMode.KeepAspectRatio}
/>
</View>
)
export default CoverMetadata
Metadata
Assignees
Labels
No labels