Skip to content

Instantly share code, notes, and snippets.

@schnerd
Created May 31, 2018 20:37
Show Gist options
  • Save schnerd/b401d744946fd8294990d5cbee5c628a to your computer and use it in GitHub Desktop.
Save schnerd/b401d744946fd8294990d5cbee5c628a to your computer and use it in GitHub Desktop.
Bring-your-own-styles
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);
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