@escolalms/components
Advanced tools
Comparing version 0.0.59 to 0.0.60
@@ -10,3 +10,3 @@ import * as React from "react"; | ||
export interface TutorProps extends StyledTourProps, ExtendableStyledComponent { | ||
title: ReactNode | string; | ||
title: ReactNode; | ||
fullName: ReactNode | string; | ||
@@ -13,0 +13,0 @@ avatar: AvatarProps; |
@@ -17,2 +17,25 @@ "use strict"; | ||
}; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -24,2 +47,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
var jsx_runtime_1 = require("react/jsx-runtime"); | ||
var React = __importStar(require("react")); | ||
var styled_components_1 = __importDefault(require("styled-components")); | ||
@@ -39,5 +63,5 @@ var Title_1 = require("../../atoms/Typography/Title"); | ||
var title = props.title, fullName = props.fullName, avatar = props.avatar, rating = props.rating, coursesInfo = props.coursesInfo, description = props.description, mobile = props.mobile, _a = props.className, className = _a === void 0 ? "" : _a; | ||
return ((0, jsx_runtime_1.jsxs)(StyledTutor, __assign({ className: "wellms-component lms-tutor ".concat(className), mobile: mobile }, { children: [(0, jsx_runtime_1.jsx)(Title_1.Title, __assign({ as: "h3", level: 4, className: "title" }, { children: title })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "avatar-row" }, { children: [(0, jsx_runtime_1.jsx)(Avatar_1.Avatar, __assign({ size: "extraLarge" }, avatar)), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "avatar-info" }, { children: [(0, jsx_runtime_1.jsx)(Title_1.Title, __assign({ as: "h4", level: 4 }, { children: fullName })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "ranking-row" }, { children: [(0, jsx_runtime_1.jsx)(Rating_1.Rating, __assign({}, rating, { label: rating.ratingValue })), coursesInfo && (0, jsx_runtime_1.jsx)(Text_1.Text, __assign({ className: "course-info" }, { children: coursesInfo }))] })), !mobile && (0, jsx_runtime_1.jsx)(Text_1.Text, __assign({ className: "description" }, { children: description }))] }))] })), mobile && (0, jsx_runtime_1.jsx)(Text_1.Text, __assign({ className: "description" }, { children: description }))] }))); | ||
return ((0, jsx_runtime_1.jsxs)(StyledTutor, __assign({ className: "wellms-component lms-tutor ".concat(className), mobile: mobile }, { children: [React.isValidElement(title) ? (title) : ((0, jsx_runtime_1.jsx)(Title_1.Title, __assign({ as: "h3", level: 4, className: "title" }, { children: title }))), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "avatar-row" }, { children: [(0, jsx_runtime_1.jsx)(Avatar_1.Avatar, __assign({ size: "extraLarge" }, avatar)), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "avatar-info" }, { children: [(0, jsx_runtime_1.jsx)(Title_1.Title, __assign({ as: "h4", level: 4 }, { children: fullName })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "ranking-row" }, { children: [(0, jsx_runtime_1.jsx)(Rating_1.Rating, __assign({}, rating, { label: rating.ratingValue })), coursesInfo && (0, jsx_runtime_1.jsx)(Text_1.Text, __assign({ className: "course-info" }, { children: coursesInfo }))] })), !mobile && (0, jsx_runtime_1.jsx)(Text_1.Text, __assign({ className: "description" }, { children: description }))] }))] })), mobile && (0, jsx_runtime_1.jsx)(Text_1.Text, __assign({ className: "description" }, { children: description }))] }))); | ||
}; | ||
exports.Tutor = Tutor; | ||
var templateObject_1; |
@@ -92,3 +92,3 @@ "use strict"; | ||
}, [updateAvatar]); | ||
return ((0, jsx_runtime_1.jsxs)(react_grid_system_1.Container, { children: [(0, jsx_runtime_1.jsx)(react_grid_system_1.Row, { children: (0, jsx_runtime_1.jsx)(react_grid_system_1.Col, __assign({ sm: 12 }, { children: (0, jsx_runtime_1.jsxs)(StyledFormHeader, __assign({ className: "wellms-component ".concat(className), mobile: mobile }, { children: [(0, jsx_runtime_1.jsx)(__1.Title, __assign({ level: 3 }, { children: t("MyProfileForm.Heading") })), (0, jsx_runtime_1.jsx)(__1.Text, __assign({ level: 3 }, { children: t("MyProfileForm.Subtitle") }))] })) })) }), (0, jsx_runtime_1.jsxs)(react_grid_system_1.Row, { children: [(0, jsx_runtime_1.jsx)(react_grid_system_1.Col, __assign({ sm: mobile ? 12 : 2, className: "upload-column" }, { children: (0, jsx_runtime_1.jsx)(StyledFormHeader, __assign({ className: "wellms-component", mobile: mobile }, { children: (0, jsx_runtime_1.jsx)(Upload_1.Upload, { path: initialValues.path_avatar, url: initialValues.avatar, accept: "image/*", onChange: onAvatarChange }) })) })), (0, jsx_runtime_1.jsx)(react_grid_system_1.Col, __assign({ sm: mobile ? 12 : 8 }, { children: (0, jsx_runtime_1.jsx)(StyledDiv, __assign({ className: "wellms-component", mobile: mobile }, { children: (0, jsx_runtime_1.jsx)(formik_1.Formik, __assign({ enableReinitialize: true, initialValues: initialValues, validate: function (values) { | ||
return ((0, jsx_runtime_1.jsxs)(react_grid_system_1.Container, { children: [(0, jsx_runtime_1.jsx)(react_grid_system_1.Row, { children: (0, jsx_runtime_1.jsx)(react_grid_system_1.Col, __assign({ sm: 12 }, { children: (0, jsx_runtime_1.jsxs)(StyledFormHeader, __assign({ className: "wellms-component ".concat(className), mobile: mobile }, { children: [(0, jsx_runtime_1.jsx)(__1.Title, __assign({ level: 3, as: "h2" }, { children: t("MyProfileForm.Heading") })), (0, jsx_runtime_1.jsx)(__1.Text, __assign({ level: 3 }, { children: t("MyProfileForm.Subtitle") }))] })) })) }), (0, jsx_runtime_1.jsxs)(react_grid_system_1.Row, { children: [(0, jsx_runtime_1.jsx)(react_grid_system_1.Col, __assign({ sm: mobile ? 12 : 2, className: "upload-column" }, { children: (0, jsx_runtime_1.jsx)(StyledFormHeader, __assign({ className: "wellms-component", mobile: mobile }, { children: (0, jsx_runtime_1.jsx)(Upload_1.Upload, { path: initialValues.path_avatar, url: initialValues.avatar, accept: "image/*", onChange: onAvatarChange }) })) })), (0, jsx_runtime_1.jsx)(react_grid_system_1.Col, __assign({ sm: mobile ? 12 : 8 }, { children: (0, jsx_runtime_1.jsx)(StyledDiv, __assign({ className: "wellms-component", mobile: mobile }, { children: (0, jsx_runtime_1.jsx)(formik_1.Formik, __assign({ enableReinitialize: true, initialValues: initialValues, validate: function (values) { | ||
var errors = {}; | ||
@@ -95,0 +95,0 @@ if (!values.first_name) { |
{ | ||
"name": "@escolalms/components", | ||
"version": "0.0.59", | ||
"version": "0.0.60", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -7,3 +7,3 @@ ```js | ||
import ThemeTester from "../../../styleguide/ThemeTester"; | ||
import getUniqueId from "../../../utils/utils"; | ||
import { getUniqueId } from "../../../utils/utils"; | ||
@@ -10,0 +10,0 @@ <React.Fragment> |
@@ -7,3 +7,3 @@ ```js | ||
import ThemeTester from "../../../styleguide/ThemeTester"; | ||
import getUniqueId from "../../../utils/utils"; | ||
import { getUniqueId } from "../../../utils/utils"; | ||
@@ -10,0 +10,0 @@ <React.Fragment> |
@@ -20,3 +20,7 @@ ```js | ||
}} | ||
title={"Teacher"} | ||
title={ | ||
<Title as="h3" level={4} className="title"> | ||
Teacher | ||
</Title> | ||
} | ||
fullName={"John Doe"} | ||
@@ -23,0 +27,0 @@ coursesInfo={"8 Curses"} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17024031
27140