react-bootstrap#PageHeader JavaScript Examples

The following examples show how to use react-bootstrap#PageHeader. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PromotionsPageComponent.js    From aws-workshop-colony with Apache License 2.0 6 votes vote down vote up
render(){
        return (
            <div>
                <PageHeader>Promotions</PageHeader>
                <Button bsStyle="primary" onClick={this.handleAddNewClick}>Add New</Button>
                <br/><br/><br/>
                <PromotionsList promotions={this.props.promotions}/>
            </div>
        );
    }
Example #2
Source File: ManagePromotionComponent.js    From aws-workshop-colony with Apache License 2.0 5 votes vote down vote up
render(){
        // const manageCodesButtonsStyle = { 'margin': '0 0 0 10px'};
        const isNew = this.state.isNew;
        let pageHeader = !isNew ? "Edit Promotion" : "Add New Promotion";
        console.log('isNew promo: ' + isNew);
        console.log('promotion: ' + JSON.stringify(this.state.promotion));

        return (
            <div>
                <PageHeader>{pageHeader}</PageHeader>
                <form>
                    <FieldGroup
                        id="promotionId"
                        name="_id"
                        type="text"
                        label="Promotion Id"
                        value={this.state.promotion._id}
                        onChange={this.handleInputChange}
                        placeholder="Enter unique promotion id"
                        readOnly={!isNew}/>
                    <FieldGroup
                        id="promotionName"
                        name="promoName"
                        type="text"
                        label="Promotion Name"
                        onChange={this.handleInputChange}
                        value={this.state.promotion.promoName}
                        placeholder="Enter promotion name"/>
                    <FieldGroup
                        id="productName"
                        name="productName"
                        type="text"
                        label="Product Name"
                        onChange={this.handleInputChange}
                        value={this.state.promotion.productName}
                        placeholder="Enter product name"
                        help="The product name will be displayed to users viewing the promotion."/>
                    <FieldGroup
                        id="productUrl"
                        name="productUrl"
                        type="text"
                        label="Product Url"
                        onChange={this.handleInputChange}
                        value={this.state.promotion.productUrl}
                        placeholder="Enter product name" />
                    <SelectFieldGroup
                        id="promotionState"
                        name="isActive"
                        label="Promotion State"
                        onChange={this.handleInputChange}
                        value={this.state.promotion.isActive}
                        options={[{
                                value: true,
                                text: "Active"
                            },{
                                value: false,
                                text: "Not Active"
                            }
                        ]}
                        placeholder="Set promotion state"
                        help="Set the promotion active state.">
                    </SelectFieldGroup>
                    <div>
                        <Button bsStyle="primary" onClick={this.handlePromotionSave}>Save</Button>
                        {/* <Button bsStyle="default" onClick={this.handleManageCodesClick} disabled={this.state.isNew}
                                style={manageCodesButtonsStyle}>Manage Codes
                        </Button> */}
                    </div>
                </form>
            </div>
        );
    }