6.4.0 • Published 2 years ago

@comparaonline/ui-offer-details-collapse v6.4.0

Weekly downloads
19
License
MIT
Repository
-
Last release
2 years ago

@comparaonline/ui-offer-details-collapse

A package for render the detail for an offer / product into Compara Online

Getting Started

To getting started with this package you will first install it, so

yarn add @comparaonline/ui-offer-details-collapse

or

npm install @comparaonline/ui-offer-details-collapse

import React from 'react';
import DetailWithCollapseAttributes from '@comparaonline/ui-offer-details-collapse';

class View extends React.Component {
  render() {
    const offersArray = [..., offer];
    return (
      <Grid>
        <DetailWithCollapseAttributes
          offers={offersArray}
          current={offer.id}
          onClose={this.whenClose}
          callToActionText={this.functionToRenderCallToActionText}
          onCallToAction={this.onCallToActionHandler}
        />
      </Grid>
    );
  }
}

this component is built over the new Context API to manage the offers passed.

so is not a complex component usage, so the following will be the props that your should provide to getting started with this package.

Prop NameDescriptionDefault ValueExpected Type ValueRequired
offersArray of offers to be navigableundefinedOffer[]true
currentthe current offer id to be shownundefinedstringtrue
onClosea function that will execute the onClose intentundefined(offer) => voidtrue
callToActionTexta function that must return the text for call to action buttonundefined(offer) => string;true
onCallToActiona function that will be invoked when call to action is executedundefined(offer) => void;true

Happy Coding :sunglasses:

6.4.0

2 years ago

6.3.0

2 years ago

6.2.0

2 years ago

6.1.0

3 years ago

5.8.0

4 years ago

5.6.5

4 years ago

5.4.15

4 years ago

5.4.14

4 years ago

5.4.12

4 years ago

5.4.9

4 years ago

5.4.10

4 years ago

5.4.11

4 years ago

5.4.8

4 years ago

5.4.7

4 years ago

5.4.6

5 years ago

5.4.5

5 years ago

5.4.4

5 years ago

5.4.3

5 years ago

5.2.0

5 years ago

5.1.2

5 years ago

5.1.1

5 years ago

4.12.1

5 years ago

4.12.0

5 years ago

4.11.0

5 years ago

4.10.2

5 years ago

4.9.1

5 years ago

4.9.0

5 years ago

4.8.7

5 years ago

4.8.5

5 years ago

4.8.4

5 years ago

4.8.2

5 years ago

4.7.4

5 years ago

4.7.1

5 years ago

4.7.0

5 years ago

4.6.0

5 years ago

4.5.0

5 years ago

4.4.0

5 years ago

4.3.6

5 years ago

4.3.3

5 years ago

4.3.2

5 years ago

4.3.1

5 years ago

4.3.0

5 years ago

4.2.3

5 years ago

4.1.1

5 years ago

4.1.0

5 years ago

4.0.5

5 years ago

4.0.4

5 years ago

4.0.1

5 years ago

4.0.0

5 years ago

3.6.4

5 years ago

3.6.3

5 years ago

3.5.8

5 years ago

3.5.7

5 years ago

3.5.6

5 years ago

3.5.5

5 years ago

3.5.4

5 years ago

3.5.3

5 years ago

3.5.2

5 years ago

3.4.6

5 years ago