discus-lib
Advanced tools
Comparing version 1.0.10 to 1.0.11
@@ -46,4 +46,4 @@ "use strict"; | ||
flexDirection: "column", | ||
minWidth: "500px", | ||
maxWidth: "fit-content", | ||
// minWidth: "500px", | ||
// maxWidth: "fit-content", | ||
gap: "6px", | ||
@@ -50,0 +50,0 @@ margin: "15px 25px", |
@@ -43,3 +43,3 @@ "use strict"; | ||
return (react_1["default"].createElement("div", null, | ||
(showCommentBox || !isReply) && (react_1["default"].createElement("div", { id: "cb-container", style: { display: "flex", width: "450px", gap: "10px" } }, | ||
(showCommentBox || !isReply) && (react_1["default"].createElement("div", { id: "cb-container", style: { display: "flex", gap: "10px" } }, | ||
react_1["default"].createElement("input", { type: "text", "aria-label": "comment-box", placeholder: isReply ? "Add your comment" : "Join the discussion", style: { | ||
@@ -46,0 +46,0 @@ width: "100%", |
@@ -13,5 +13,5 @@ "use strict"; | ||
var Discus = function (_a) { | ||
var _b = _a.name, name = _b === void 0 ? "Unknown User" : _b, setDiscussion = _a.setDiscussion; | ||
var _b = _a.name, name = _b === void 0 ? "Unknown User" : _b, setDiscussion = _a.setDiscussion, _c = _a.discussion, discussion = _c === void 0 ? [] : _c; | ||
var userName = (0, react_1.useState)(name)[0]; | ||
var _c = (0, react_1.useState)([]), comments = _c[0], setComments = _c[1]; | ||
var _d = (0, react_1.useState)(discussion), comments = _d[0], setComments = _d[1]; | ||
(0, react_1.useEffect)(function () { | ||
@@ -18,0 +18,0 @@ setDiscussion(comments); |
@@ -5,2 +5,3 @@ /// <reference types="react" /> | ||
setDiscussion: React.Dispatch<React.SetStateAction<CommentType[] | undefined>>; | ||
discussion: CommentType[]; | ||
}; | ||
@@ -7,0 +8,0 @@ export type CommentType = { |
@@ -42,4 +42,4 @@ import React, { useEffect, useState } from "react"; | ||
flexDirection: "column", | ||
minWidth: "500px", | ||
maxWidth: "fit-content", | ||
// minWidth: "500px", | ||
// maxWidth: "fit-content", | ||
gap: "6px", | ||
@@ -46,0 +46,0 @@ margin: "15px 25px", |
@@ -40,3 +40,3 @@ import { __spreadArray } from "tslib"; | ||
return (React.createElement("div", null, | ||
(showCommentBox || !isReply) && (React.createElement("div", { id: "cb-container", style: { display: "flex", width: "450px", gap: "10px" } }, | ||
(showCommentBox || !isReply) && (React.createElement("div", { id: "cb-container", style: { display: "flex", gap: "10px" } }, | ||
React.createElement("input", { type: "text", "aria-label": "comment-box", placeholder: isReply ? "Add your comment" : "Join the discussion", style: { | ||
@@ -43,0 +43,0 @@ width: "100%", |
@@ -9,5 +9,5 @@ import React, { createContext, useEffect, useState } from "react"; | ||
var Discus = function (_a) { | ||
var _b = _a.name, name = _b === void 0 ? "Unknown User" : _b, setDiscussion = _a.setDiscussion; | ||
var _b = _a.name, name = _b === void 0 ? "Unknown User" : _b, setDiscussion = _a.setDiscussion, _c = _a.discussion, discussion = _c === void 0 ? [] : _c; | ||
var userName = useState(name)[0]; | ||
var _c = useState([]), comments = _c[0], setComments = _c[1]; | ||
var _d = useState(discussion), comments = _d[0], setComments = _d[1]; | ||
useEffect(function () { | ||
@@ -14,0 +14,0 @@ setDiscussion(comments); |
@@ -5,2 +5,3 @@ /// <reference types="react" /> | ||
setDiscussion: React.Dispatch<React.SetStateAction<CommentType[] | undefined>>; | ||
discussion: CommentType[]; | ||
}; | ||
@@ -7,0 +8,0 @@ export type CommentType = { |
{ | ||
"name": "discus-lib", | ||
"version": "1.0.10", | ||
"version": "1.0.11", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./dist/cjs/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
40664
464