1.5.8 • Published 5 years ago

@gungdeaditya/compex-native v1.5.8

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Compex Native

Getting Started

Compex for your solutions

Basic Usage

  • Globally installed node >= 6.0
  • Globally installed npm >= 4.0
  • Globally installed React Native CLI which allow you to easily create and initialize projects.
    yarn add @gungdeaditya/compex-native
    // or with npm
    npm install --save @gungdeaditya/compex-native

Content

Container

Usage
<Container
    isHeader
    headerIcon={
        <Icon type="MaterialCommunityIcons" size={24} name="menu" />
    }
    headerTitle="Compex">
. . .
</Container>

<Container
    isHeader
    isLoading={true}>
. . .
</Container>

<Container
    isHeader
    headerBackgroundColor="red"
    headerAndroidStatusBarColor="white">
. . .
</Container>
Properties

Form Builder

alt text

Usage
import { FormBuilder } from "@gungdeaditya/compex-native";

class Test extends Component {
    const fields =[...];

    handleSubmit (selectedIndex) {
        const formValues = this.formGenerator.getValues();
        console.log("FORM VALUES", formValues);
    }

    render () {
        return (
        <View style={styles.container}>
            <FormBuilder ref={c => { this.formGenerator = c; }} fields={fields} />
            <Button block onPress={() => this.handleSubmit()}>
                <Text>Login</Text>
            </Button>
        </View>
        )
    }
}

The form that showing above gif is generated by these fields

Options Button

alt text

Usage
constructor () {
  super()
  this.state = {
    selectedIndex: 2
  }
  this.updateIndex = this.updateIndex.bind(this)
}

updateIndex (selectedIndex) {
  this.setState({selectedIndex})
}

render () {
  const buttons = ['Hello', 'World', 'Buttons']

  return (
    <OptionsButton
      onPress={this.updateIndex}
      selectedIndex={this.state.selectedIndex}
      buttons={buttons}
    />
  )
}
Properties

Small Card Product

npm.io

Usage
<SmallCardProduct
  height={250}
  width={150}
  title="Hello World"
  price="$34.0"
  imgUri={{
    uri:
      "https://cdn-images.threadless.com/threadless-shop/products/6103/1272x920shirt_guys_10.jpg?w=1272&h=920"
  }}
/>
Properties

Medium Card Product

npm.io

Usage
<MediumCardProduct
  height={250}
  width={150}
  touched={true}
  title="Hello World"
  price="$34.50"
  realPrice="$25.0"
  imgUri={{
    uri:
      "https://cdn-images.threadless.com/threadless-shop/products/6103/1272x920shirt_guys_10.jpg?w=1272&h=920"
  }}
/>
Properties

Large Card Product

npm.io

Usage
<LargeCardProduct
  touched={true}
  description="Hello World"
  likesCount={12345}
  imgUri={{
    uri:
      "https://cdn-images.threadless.com/threadless-shop/products/6103/1272x920shirt_guys_10.jpg?w=1272&h=920"
  }}
/>
Properties
1.5.8

5 years ago

1.5.7

5 years ago

1.5.6

5 years ago

1.5.5

5 years ago

1.5.4

5 years ago

1.5.3

5 years ago

1.5.2

5 years ago

1.5.1

5 years ago

1.5.0

5 years ago

1.4.3

5 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.5

5 years ago

1.3.4

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.15

5 years ago

1.2.14

5 years ago

1.2.13

5 years ago

1.2.12

5 years ago

1.2.11

5 years ago

1.2.10

5 years ago

1.2.9

5 years ago

1.2.8

5 years ago

1.2.7

5 years ago

1.2.6

5 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago