lm-web-controls 1.0.18 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lm-web-controls",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "leadmetrics-lm-web-controls",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -2,7 +2,7 @@ import React from "react";
2
2
 
3
3
  type CopyrightProps = {
4
4
  name: string;
5
- className: string;
5
+ className?: string;
6
6
  };
7
7
 
8
8
  export function Copyright({ name, className }: CopyrightProps) {
@@ -2,7 +2,7 @@ import React from "react";
2
2
 
3
3
  type EmailProps = {
4
4
  value: string;
5
- className: string;
5
+ className?: string;
6
6
  };
7
7
 
8
8
  export function Email({ value, className }: EmailProps) {
@@ -7,7 +7,13 @@ import { useEffect, useState } from "react";
7
7
  import "slick-carousel/slick/slick.css";
8
8
  import "slick-carousel/slick/slick-theme.css";
9
9
 
10
- type InstaFeedProps = { apiKey: string; className: string };
10
+ import "../../styles/style.css";
11
+
12
+ type InstaFeedProps = {
13
+ apiKey: string;
14
+ sliderClassName?: string;
15
+ imgClassName?: string;
16
+ };
11
17
 
12
18
  type InstagramPost = {
13
19
  id: string;
@@ -19,7 +25,11 @@ type InstagramPost = {
19
25
 
20
26
  type InstagramPostList = InstagramPost[];
21
27
 
22
- export function InstaFeed({ apiKey, className }: InstaFeedProps) {
28
+ export function InstaFeed({
29
+ apiKey,
30
+ sliderClassName,
31
+ imgClassName,
32
+ }: InstaFeedProps) {
23
33
  const [igFeeds, setIgFeeds] = useState<InstagramPostList | null>(null);
24
34
  const [fetchStatus, setFetchStatus] = useState<string>("Loading feeds...");
25
35
 
@@ -78,10 +88,10 @@ export function InstaFeed({ apiKey, className }: InstaFeedProps) {
78
88
  return (
79
89
  <>
80
90
  {igFeeds ? (
81
- <Slider {...settings} className={className}>
91
+ <Slider {...settings} className={`${sliderClassName} lm-slider`}>
82
92
  {igFeeds?.map((item, i) => {
83
93
  return (
84
- <div key={crypto.randomUUID()}>
94
+ <div key={crypto.randomUUID()} className={imgClassName}>
85
95
  <img src={item.media_url} alt={`image-${i}`} />
86
96
  </div>
87
97
  );
@@ -3,12 +3,11 @@ import React from "react";
3
3
  type MapProps = {
4
4
  id?: string;
5
5
  address: string;
6
- height: string | number;
7
- width: string | number;
8
- key: string;
6
+ height?: string | number;
7
+ width?: string | number;
9
8
  };
10
9
 
11
- export function Map({ id, address, height, width, key }: MapProps) {
10
+ export function Map({ id, address, height, width }: MapProps) {
12
11
  return (
13
12
  <iframe
14
13
  id={id}
@@ -16,7 +15,7 @@ export function Map({ id, address, height, width, key }: MapProps) {
16
15
  height={height}
17
16
  loading="lazy"
18
17
  referrerPolicy="no-referrer-when-downgrade"
19
- src={`https://www.google.com/maps/embed/v1/place?key=${process.env.NEXT_PUBLIC_GOOGLE_MAPS_API_KEY}&q=place_id:ChIJaZ6ne_U_rjsRFN98AFmq6hg`}
18
+ src={address}
20
19
  ></iframe>
21
20
  );
22
21
  }
@@ -2,8 +2,8 @@ import React from "react";
2
2
 
3
3
  type PhoneProps = {
4
4
  value: string;
5
- country: string;
6
- className: string;
5
+ country?: string;
6
+ className?: string;
7
7
  };
8
8
 
9
9
  export function Phone({ value, country, className }: PhoneProps) {
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from "./blocks/copyright";
2
2
  export * from "./blocks/email";
3
3
  export * from "./blocks/instaFeed";
4
- //export * from "./blocks/map";
4
+ export * from "./blocks/map";
5
5
  export * from "./blocks/phone";
@@ -0,0 +1,4 @@
1
+ .lm-slider {
2
+ height: 100vh;
3
+ background: red;
4
+ }
@@ -3,25 +3,36 @@ import React, { Component, ChangeEvent } from "react";
3
3
  declare module "lm-web-controls" {
4
4
  type EmailProps = {
5
5
  value: string;
6
- className: string;
6
+ className?: string;
7
7
  };
8
- export const Email: React.FC<EmailProps>;
9
8
 
10
9
  type CopyrightProps = {
11
10
  name: string;
12
- className: string;
11
+ className?: string;
13
12
  };
14
- export const Copyright: React.FC<CopyrightProps>;
15
13
 
16
14
  type PhoneProps = {
17
15
  value: string;
18
- country: string;
19
- className: string;
16
+ country?: string;
17
+ className?: string;
20
18
  };
21
- export const Phone: React.FC<PhoneProps>;
22
19
 
23
- //email
20
+ type MapProps = {
21
+ id?: string;
22
+ address: string;
23
+ height?: string | number;
24
+ width?: string | number;
25
+ };
24
26
 
25
- type InstaFeedProps = { apiKey: string; className: string };
27
+ type InstaFeedProps = {
28
+ apiKey: string;
29
+ sliderClassName?: string;
30
+ imgClassName?: string;
31
+ };
32
+
33
+ export const Email: React.FC<EmailProps>;
34
+ export const Copyright: React.FC<CopyrightProps>;
35
+ export const Phone: React.FC<PhoneProps>;
36
+ export const Map: React.FC<MapProps>;
26
37
  export const InstaFeed: React.FC<InstaFeedProps>;
27
38
  }