react-pop-cards 1.0.0 → 1.0.2
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/dist/index.css +4 -0
- package/dist/index.d.ts +16 -0
- package/dist/lib/components/Card.js +5 -2
- package/package.json +2 -2
package/dist/index.css
CHANGED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface CardDataItem {
|
|
2
|
+
title: string
|
|
3
|
+
description: string
|
|
4
|
+
image?: string
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
interface CardProps {
|
|
8
|
+
data: CardDataItem[]
|
|
9
|
+
bgColor?: string
|
|
10
|
+
disposition?: "LeftRight" | "RightLeft" | "TopBottom" | "BottomTop"
|
|
11
|
+
isRounded?: boolean
|
|
12
|
+
tension?: number
|
|
13
|
+
friction?: number
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export declare const Card: React.FC<CardProps>
|
|
@@ -166,7 +166,7 @@ const Card = _ref => {
|
|
|
166
166
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
167
167
|
className: "flex max-sm:flex-col-reverse justify-between items-center"
|
|
168
168
|
}, /*#__PURE__*/_react.default.createElement("label", {
|
|
169
|
-
className: (activeCard === value.title ? "max-sm:text-xl text-
|
|
169
|
+
className: (activeCard === value.title ? "max-sm:text-xl text-4xl" : "max-sm:text-xs text-base") + " capitalize font-bold duration-100"
|
|
170
170
|
}, value.title), activeCard === value.title && value.image != null && /*#__PURE__*/_react.default.createElement("img", {
|
|
171
171
|
className: "max-sm:w-12 max-sm:h-12 w-20 h-20",
|
|
172
172
|
src: value.image,
|
|
@@ -175,7 +175,10 @@ const Card = _ref => {
|
|
|
175
175
|
className: "line-clamp-[8] text-justify max-sm:text-xs"
|
|
176
176
|
}, value.description)))));
|
|
177
177
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
178
|
-
className: (disposition === "RightLeft" ? "order-1" : "order-2") + " ".concat(miniCardDivClass)
|
|
178
|
+
className: (disposition === "RightLeft" ? "order-1" : "order-2") + " ".concat(miniCardDivClass),
|
|
179
|
+
style: {
|
|
180
|
+
color: textColor
|
|
181
|
+
}
|
|
179
182
|
}, Object.entries(cards).map(_ref3 => {
|
|
180
183
|
let [key, value] = _ref3;
|
|
181
184
|
return /*#__PURE__*/_react.default.createElement("div", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-pop-cards",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"dev": "react-scripts start",
|
|
37
|
-
"build": "rm -rf dist && NODE_ENV=production babel src/index.js --out-dir dist --copy-files && babel src/lib/components/Card.js --out-dir dist/lib/components --copy-files && postcss src/index.css -o dist/index.css",
|
|
37
|
+
"build": "rm -rf dist && NODE_ENV=production babel src/index.js --out-dir dist --copy-files && babel src/index.d.ts --out-dir dist --copy-files && babel src/lib/components/Card.js --out-dir dist/lib/components --copy-files && postcss src/index.css -o dist/index.css",
|
|
38
38
|
"build:vercel": "react-scripts build",
|
|
39
39
|
"test": "react-scripts test",
|
|
40
40
|
"eject": "react-scripts eject"
|