@nutrafol/popup-helper
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -111,3 +111,3 @@ /** | ||
//IOS: allow scroll only, disallow pinch zoom | ||
if (popupHelper.isMobile()) { | ||
if (config.preventTouch && popupHelper.isMobile()) { | ||
document.addEventListener('touchmove', touchHandler, {passive: false}) | ||
@@ -114,0 +114,0 @@ } |
{ | ||
"name": "@nutrafol/popup-helper", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "nutrafol popup helper", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -11,3 +11,20 @@ # Nutrafol popup helper | ||
## Config object | ||
**wrapper** (string, required) | ||
_wrapper DOM id_ | ||
**closeEl** (string) | ||
_close button DOM id_ | ||
**desktopEl** (string) | ||
_desktopEl DOM id if you have separated desktop content_ | ||
**mobileEl** (string) | ||
_mobileEl DOM id if you have separated mobile content_ | ||
**preventTouch** (bool, default false) | ||
_IOS: allow scroll only, disallow pinch zoom_ | ||
## Usage Example | ||
@@ -93,20 +110,2 @@ | ||
const renderDoctorSlides = data.quotes.map((item, i) => { | ||
const quotePreview = previewBuilder(item.quote); | ||
return ( | ||
<React.Fragment key={i}> | ||
<Quote> | ||
<Blockquote>“{quotePreview}...“ <ReadMore onClick={() => setActiveDoctorIndexProxy(i)}/></Blockquote> : | ||
<QuoteImage> | ||
<Image filename={item.image} alt={item.title} classes="doctor-image"/> | ||
</QuoteImage> | ||
<QuoteAuthor> | ||
<p className="title">{item.title}</p> | ||
<p className="clinic">{item.clinic}</p> | ||
<p className="location">{item.location}</p> | ||
</QuoteAuthor> | ||
</Quote> | ||
</React.Fragment> | ||
) | ||
}) | ||
@@ -117,10 +116,5 @@ | ||
<OurNetworkQuotesWrap> | ||
<h1 className="desktop">Here’s what our network has to say.</h1> | ||
<h1 className="mobile">Here’s what our<br/>network has to say.</h1> | ||
<Quotes className="container"> | ||
{renderQuotes} | ||
</Quotes> | ||
<DoctorSlider css={SliderCSS} {...settings} className="hide-md-up"> | ||
{renderDoctorSlides} | ||
</DoctorSlider> | ||
</OurNetworkQuotesWrap> | ||
@@ -127,0 +121,0 @@ ) |
8615
122