gather-content-ui
Version:
GatherContent UI Library
71 lines (70 loc) • 2.82 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ConversationContext = ConversationContext;
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _ = require("../..");
var _StoryItem = _interopRequireDefault(require("../../../stories/styleguide/StoryItem"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
// @ts-expect-error TS(2307): Cannot find module 'stories/styleguide/StoryItem' ... Remove this comment to see the full error message
var _default = exports["default"] = {
title: "Legacy/Conversations/Conversation Context",
component: _.ConversationContext
};
function ConversationContext() {
var mockUser = {
id: 2,
name: "Bruce",
avatar: "https://gathercontent-production-avatars.s3-us-west-2.amazonaws.com/208205_yHGd7vA5HRxsnMQpES4UzjJ7Yxgn6Bp54165gqksRXyDJhuOnW88H6djhLJeE2BZ.jpg",
initials: "BB",
display: "brucebanner"
};
var mockComments = [{
id: "comment-id-1",
body: "Here is a decent size comment that was created by someone who wanted to comment.",
createdAt: "2017-06-08 09:56:41",
author: mockUser,
createdBy: 2
}, {
id: "comment-id-2",
body: "Comment body and a link to http://google.com and a @mention",
createdAt: "Less than a minute ago",
author: {
avatar: "https://gathercontent-production-avatars.s3-us-west-2.amazonaws.com/26263_nH1Vuciy3psgQEUCVXZPTVU2RzUyMJ2arUIH7le8U4RrJ9LjFrtvEmyzf2XFgnZ7.png",
name: "Ricardo",
initials: "RB"
},
createdBy: 2
}];
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_StoryItem["default"], {
title: "ConversationContextComponent Component",
description: "Display a conversation with some context"
}, /*#__PURE__*/_react["default"].createElement(_.ConversationContext, {
label: "A nice label",
id: "123",
userCanResolve: true,
comments: mockComments,
resolveConversation: function resolveConversation() {},
users: [],
resolved: true
}, /*#__PURE__*/_react["default"].createElement("span", null, "Hello!"))), /*#__PURE__*/_react["default"].createElement(_StoryItem["default"], {
title: "ConversationContextComponent Component",
description: "Conversation context with no children"
}, /*#__PURE__*/_react["default"].createElement(_.ConversationContext, {
label: "A nice label",
id: "123",
resolved: false,
userCanResolve: true,
comments: mockComments,
resolveConversation: function resolveConversation() {},
users: []
}, null)));
}
ConversationContext.parameters = {
controls: {
hideNoControlsWarning: true
}
};
//# sourceMappingURL=ConversationContext.stories.js.map