Created
May 31, 2018 20:37
-
-
Save schnerd/b401d744946fd8294990d5cbee5c628a to your computer and use it in GitHub Desktop.
Bring-your-own-styles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {defaultProps} from 'recompose'; | |
import glamorous from 'glamorous'; | |
import {AutocompleteBase} from './Autocomplete'; | |
export const $Root = glamorous.div({ | |
border: '1px solid #ccc', | |
width: '300px', | |
margin: '0 auto', | |
}); | |
export const $TextInput = glamorous.input({ | |
border: 'none', | |
padding: '8px 10px', | |
boxSizing: 'border-box', | |
width: '100%', | |
}); | |
export const $Results = 'div'; | |
export const $Result = glamorous.div({ | |
borderTop: '1px solid #ccc', | |
padding: '8px 10px', | |
cursor: 'pointer', | |
':hover': { | |
backgroundColor: 'AliceBlue' | |
} | |
}); | |
export default defaultProps({ | |
$Root, | |
$Results, | |
$Result, | |
$TextInput | |
})(AutocompleteBase); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {defaultProps} from 'recompose'; | |
import {AutocompleteBase} from './Autocomplete'; | |
import {View, Text, TextInput} from 'react-native'; | |
const $Root = View; | |
const $TextInput = TextInput; | |
const $Results = View; | |
const $Result = Text; | |
export default defaultProps({ | |
$Root, | |
$TextInput, | |
$Results, | |
$Result, | |
})(AutocompleteBase); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment