Skip to content

Commit

Permalink
Removed the 'Cn' prefix from all components
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaizeras committed Jul 26, 2017
1 parent 73aeeea commit fb08791
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 94 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ npm install centro-ui --save
2. __Import in your project__

```
import { CnContainer } from 'centro-ui';
import { Container } from 'centro-ui';
```

3. __Invoke the component(s) in your view__

```
<CnContainer> </CnContainer>
<Container> </Container>
```

4. __Add interactivity__
Expand Down Expand Up @@ -104,11 +104,11 @@ function init(bundle, parent, options) {
<Pano source={asset('bg3.jpg')}/>
/* CnContainer acts as a screen that contains all components. Can be placed in different directions */
<CnContainer backgroundColor="transparent">
/* Container acts as a screen that contains all components. Can be placed in different directions */
<Container backgroundColor="transparent">
/* Add a navbar */
<CnNavbar>
<Navbar>
<CnNavItem>
Hello CentroUI
</CnNavItem>
Expand All @@ -124,20 +124,20 @@ function init(bundle, parent, options) {
<CnNavItem>
Home
</CnNavItem>
</CnNavbar>
</Navbar>
/* CnRow contains all items in a given row */
<CnRow>
/* List different items */
<CnList>
<CnListItem>
<List>
<ListItem>
List Item 1
</CnListItem>
</ListItem>
<CnListItem>
<ListItem>
List Item 2
</CnListItem>
</CnList>
</ListItem>
</List>
/* Simple card for displaying different types of content */
<CnCard>
Expand Down Expand Up @@ -166,7 +166,7 @@ function init(bundle, parent, options) {
</CnCardFooter>
</CnCard>
</CnRow>
</CnContainer>
</Container>
</View>
```
Expand Down
2 changes: 1 addition & 1 deletion components/button/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const DEFAULT_ACTIVE_COLOR = "rgba(0,0,0,0.2)"
const DEFAULT_ACTIVE_BORDER_COLOR = "#0275d8";
const DEFAULT_INACTIVE_BORDER_COLOR = "#eceeef";

export default class CnButton extends React.Component {
export default class Button extends React.Component {
constructor(props) {
super(props);
}
Expand Down
2 changes: 1 addition & 1 deletion components/core/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from 'react-vr';


export default class CnContainer extends React.Component {
export default class Container extends React.Component {


constructor(props) {
Expand Down
44 changes: 0 additions & 44 deletions components/core/row.js

This file was deleted.

12 changes: 6 additions & 6 deletions components/list/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {
Plane,
} from 'react-vr';
import View from '../core/view'
import CnButton from '../button/button'
import Button from '../button/button'

export default class CnList extends React.Component {
export default class List extends React.Component {

constructor(props) {
super(props);
Expand Down Expand Up @@ -73,19 +73,19 @@ export default class CnList extends React.Component {
var disabledDown = startRowsIndex + visibleRows >= data.length
return (
<View {...this.props}>
<CnButton onClick={this.scrollUp} disabled={disabledUp} bg="transparent">
<Button onClick={this.scrollUp} disabled={disabledUp} bg="transparent">
<View hcenter h={0.1}>
<Text style={{fontSize: 0.09}}>{disabledUp ? " " : "..."}</Text>
</View>
</CnButton>
</Button>
<View border={{width: 0.01}}>
{this.renderRows()}
</View>
<CnButton onClick={this.scrollDown} disabled={disabledDown} bg="transparent">
<Button onClick={this.scrollDown} disabled={disabledDown} bg="transparent">
<View hcenter h={0.1}>
<Text style={{fontSize: 0.09}}>{disabledDown ? " " : "..."}</Text>
</View>
</CnButton>
</Button>
</View>
);
}
Expand Down
2 changes: 1 addition & 1 deletion components/navbar/navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from 'react-vr';


export default class CnNavbar extends React.Component {
export default class Navbar extends React.Component {

constructor(props) {
super(props);
Expand Down
4 changes: 2 additions & 2 deletions components/text-input/text-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { View, VrButton, Text } from 'react-vr';
import Keyboard from './keyboard';
import Scroll from './text-input-scroll'

class CnTextInput extends React.Component {
class TextInput extends React.Component {
constructor(props) {
super(props);
this.state = {
Expand Down Expand Up @@ -488,4 +488,4 @@ class CnTextInput extends React.Component {
}
}

export default CnTextInput;
export default TextInput;
10 changes: 5 additions & 5 deletions examples/index.vr.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import React from 'react';
import { AppRegistry, Text } from 'react-vr';
import CnContainer from '../components/core/container';
import Container from '../components/core/container';
import View from '../components/core/view';
import CnButton from '../components/button/button';
import Button from '../components/button/button';
import CnIcon from '../components/button/icon';
import CnCardContent from '../components/card/card-content';
import CnCardFooter from '../components/card/card-footer';
import CnCardHeader from '../components/card/card-header';
import CnRow from '../components/core/row';


export default class Example extends React.Component {
render() {
return (
<CnContainer>
<Container>
<View row flex>
<View vcenter hcenter bg="red" flex>
<Text style={{color: '#000'}}>dsadas</Text>
Expand All @@ -24,7 +24,7 @@ export default class Example extends React.Component {
<Text style={{color: '#000'}}>dsadas</Text>
</View>
</View>
</CnContainer>
</Container>
);
}
}
Expand Down
35 changes: 14 additions & 21 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@

import CnContainer from "./components/core/container"
import CnNavbar from "./components/navbar/navbar"
import CnNavItem from "./components/navbar/nav-item"
import Container from "./components/core/container"
import Navbar from "./components/navbar/navbar"
import NavItem from "./components/navbar/nav-item"
import View from "./components/core/view"
import CnRow from "./components/core/row"
import CnCardHeader from "./components/card/card-header"
import CnCardContent from "./components/card/card-content"
import CnCardFooter from "./components/card/card-footer"
import CnTextInput from "./components/text-input/text-input"
import CnList from "./components/list/list"
import CnListItem from "./components/list/list-item"

import TextInput from "./components/text-input/text-input"
import List from "./components/list/list"
import ListItem from "./components/list/list-item"
import Button from "./components/button/button"



export {
View,
CnContainer,
CnRow,
CnNavbar,
CnNavItem,
CnCardHeader,
CnCardContent,
CnCardFooter,
CnTextInput,
CnList,
CnListItem,
Container,
Navbar,
Button,
NavItem,
TextInput,
List,
ListItem,
};

0 comments on commit fb08791

Please sign in to comment.