ui icon indicating copy to clipboard operation
ui copied to clipboard

Strange Styling Applied

Open andreencar opened this issue 9 years ago • 10 comments

Hi, I've just incorporated ShoutemUI onto my react native app and found that the buttons on a navigationBar appear not centralized with the text on the middle and that the Button appears like it is not styled, and an image within a ScrollView is set as if it was float:left instead of centered aswell.

I'll try to upload a photo later on, but do I need to import something more for all the styling to work rather than what I need from the "@shoutem/ui"? Maybe the fact that they are being instanced by the NavigatorIOS react native component is changing the styles?

I'm really motivated to use this ui library and would not like to dismiss it for probably simple things.

P.S. I've had an issue with the navigation bar that was solved on an issue by passing the stylename 'inline'. I had to delve into github and issues to identify the solution, when it could be as simple as looking into the documentation if that styling was defined there. When is the documentation going to be updated?

andreencar avatar Jan 06 '17 14:01 andreencar

Its also strange styling, navBar buttons screen shot 2017-01-08 at 1 04 58 pm

felagund18 avatar Jan 08 '17 05:01 felagund18

That's exactly it

sky-andreencarnacao avatar Jan 09 '17 00:01 sky-andreencarnacao

Same with <Text> in <Button>, any idea? capture d ecran 2017-01-12 a 12 59 01

cmeiller avatar Jan 12 '17 11:01 cmeiller

Hitting same thing here.

SidBala avatar Jan 16 '17 01:01 SidBala

Hey guys! We have two NavigationBar components available, one to import directly from @shoutem/ui and other to be used as child component of our CardStack available in @shoutem/ui/navigation. Its example usage is shown in RestaurantsApp of our examples. Could you inform me what of those two components you are using? Also, we are aware of such alignment issue on Android with one from @shoutem/ui/navigation and I hope we will fix it this or next week. But last image by @cmeiller looks like it has been taken on iOS, and its really strange that left and right Button are unaligned. @cmeiller could you please share your code with me? Maybe I have a clue why that is happening to you.

SoHotSoup avatar Jan 18 '17 09:01 SoHotSoup

@SoHotSoup thanks for your answer. Indeed the screen is from iOS. I use react-native-router-flux and extend their NavBar with yours like that:

import React from 'react';
import { NavBar } from 'react-native-router-flux';
import { Button, Icon, NavigationBar, Text, Title } from '@shoutem/ui';

class MainNavBar extends NavBar {
  ...

  render() {
    return (
      <NavigationBar
        styleName="clear"
        leftComponent={<Button><Text>Test</Text></Button>}
        centerComponent={<Title>{this.props.title}</Title>}
        rightComponent={<Icon name="ic_user_profile" onPress={...} />}
      />
    );
  }
}

Title and Icon are aligned correctly but not the Test text.

Is it a problem because I didn't used the second NavigationBar from @shoutem/ui/navigation ? I missed it.

cmeiller avatar Jan 18 '17 10:01 cmeiller

The entire NavigationBar seems to be spaced incorrectly for me. Using navbar + icon example from the doc

image

keyeh avatar Feb 09 '17 06:02 keyeh

Any updates on this issue? Running into the same problem using the @shoutem/ui NavigationBar...

sisiguo avatar Feb 21 '17 09:02 sisiguo

Me too. I want to start react native with @shoutem/ui but same problem..

latte-diygame avatar Mar 04 '17 15:03 latte-diygame

This was fixed in #216

zrumenjak avatar Apr 06 '17 13:04 zrumenjak