Skip to content
This repository has been archived by the owner on Aug 28, 2022. It is now read-only.

Commit

Permalink
refactor(exports): removes named component exports
Browse files Browse the repository at this point in the history
  • Loading branch information
atticoos committed May 17, 2017
1 parent 95d0274 commit 316c35d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ In fact, it's even better, because there are a bunch of features that make compo
Oh, and what if you don't care to give `MyStyledText` a name? If you just want a text that's styled using `StyleSheet`? You can do that too:

```js
import {Text} from 'glamorous-native';
const {Text} = glamorous;

function Section() {
return (
Expand Down
4 changes: 3 additions & 1 deletion examples/react-native-glamorous-themes/example.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react'
import glamorous, {ThemeProvider, TouchableOpacity} from 'glamorous-native'
import glamorous, {ThemeProvider} from 'glamorous-native'

const {TouchableOpacity} = glamorous

// A View that reflects a specified theme
const ThemedView = glamorous.view((props, theme) => ({
Expand Down
15 changes: 0 additions & 15 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,3 @@ Object.assign(

export default glamorous
export {ThemeProvider, withTheme}

// Temporary workaround to allow named component exports
// eg: import {View} from 'glamorous-native
export const FlatList = glamorous.FlatList
export const Image = glamorous.Image
export const ListView = glamorous.ListView
export const ScrollView = glamorous.ScrollView
export const SectionList = glamorous.SectionList
export const Text = glamorous.Text
export const TextInput = glamorous.TextInput
export const TouchableHighlight = glamorous.TouchableHighlight
export const TouchableNativeFeedback = glamorous.TouchableNativeFeedback
export const TouchableOpacity = glamorous.TouchableOpacity
export const TouchableWithoutFeedback = glamorous.TouchableWithoutFeedback
export const View = glamorous.View

0 comments on commit 316c35d

Please sign in to comment.