NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

SearchBar not apply styles

Open thienlhh opened this issue 9 years ago • 2 comments

I using the code example on NB documentation for SearchBar component but it seem the styles was not applied correctly:

<Header searchBar rounded>
    <InputGroup>
        <Icon name="ios-search" />
             <Input placeholder="Search" />
        <Icon name="ios-people" />
   </InputGroup>
</Header>

When I try to change the styles of ".searchBar", ".rounded" in "native-base-base-theme/components/Header.js" to:

NativeBase.Item to NativeBase.InputGroup

then it working fine

react-native, react and native-base version

"native-base": "2.1.1", "react": "16.0.0-alpha.3", "react-native": "0.43.1",

Screenshot of emulator/device

Samsung galaxy S6 - Android 6.0 capture

Is the bug present in both ios and android or in any one of them?

I'm working on Windows so it is issue just for android

thienlhh avatar Apr 21 '17 06:04 thienlhh

@thienlhh InputGroup is deprecated from NB 2.X you can use instead Item. You can have a look here how Item are used .

geekrishabh avatar Apr 21 '17 07:04 geekrishabh

Thanks @GeekRishabh it works, then I think it should have some changes in the documentation and it wont make confusing.

Btw, thank you

thienlhh avatar Apr 21 '17 07:04 thienlhh