0

In this following example, my add-to-favorites button is not right aligned and is black instead of white. I don't see any styles defined anywhere and I can't seem to get to the safari inspector using exponent.

Incorrect

incorrect black star

Correct white star that's right aligned

enter image description here

Looking at the sample code https://github.com/shoutem/ui/blob/develop/examples/components/Tiles.js - it looks like it should style it to white and right aligned but it doesn't do so in my case. Do I need to wrap it in an enclosing style? How do i debug this?

render() {

 return (
  <View style={styles.container}>
    <Image
      styleName="large-banner"
      source={{ uri: 'https://shoutem.github.io/img/ui-toolkit/examples/image-3.png' }}
    >
      <Tile>
        <View styleName="actions">
          <Button styleName="tight clear"><Icon name="add-to-favorites" /></Button>
        </View>
        <Title>HOW TO MAINTAIN YOUR MENTAL HEALTH IN 2016</Title>
        <Caption>6557 Americo Hills Apt. 118</Caption>
      </Tile>
    </Image>
   ....
MonkeyBonkey
  • 46,433
  • 78
  • 254
  • 460

1 Answers1

0

It was because I was importing View from react-native. Once I started to import View from @shoutem/ui it carried over the correct styles.

MonkeyBonkey
  • 46,433
  • 78
  • 254
  • 460