@donglegeyu/company-ui 1.2.12 → 1.2.13

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.
@@ -1,6 +1,7 @@
1
1
  import './index.scss';
2
2
  interface SectionTitleProps {
3
3
  title: string;
4
+ description?: string;
4
5
  }
5
- export default function SectionTitle({ title }: SectionTitleProps): import("react/jsx-runtime").JSX.Element;
6
+ export default function SectionTitle({ title, description }: SectionTitleProps): import("react/jsx-runtime").JSX.Element;
6
7
  export {};
@@ -24,9 +24,12 @@ __export(SectionTitle_exports, {
24
24
  module.exports = __toCommonJS(SectionTitle_exports);
25
25
  var import_index = require("./index.scss");
26
26
  var import_jsx_runtime = require("react/jsx-runtime");
27
- function SectionTitle({ title }) {
28
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "section-title", children: [
27
+ function SectionTitle({ title, description }) {
28
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `section-title${description ? " section-title-with-desc" : ""}`, children: [
29
29
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "section-title-bar" }),
30
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "section-title-text", children: title })
30
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "section-title-content", children: [
31
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "section-title-text", children: title }),
32
+ description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "section-title-desc", children: description })
33
+ ] })
31
34
  ] });
32
35
  }
@@ -20,3 +20,28 @@
20
20
  font-weight: 600;
21
21
  color: #1D2129;
22
22
  }
23
+
24
+ .section-title-with-desc {
25
+ height: auto;
26
+ align-items: flex-start;
27
+ padding: 12px 0;
28
+
29
+ .section-title-bar {
30
+ height: 100%;
31
+ min-height: 16px;
32
+ }
33
+
34
+ .section-title-content {
35
+ display: flex;
36
+ flex-direction: column;
37
+ gap: 4px;
38
+ line-height: 1.5;
39
+ }
40
+ }
41
+
42
+ .section-title-desc {
43
+ font-size: 12px;
44
+ font-weight: 400;
45
+ color: rgba(29, 33, 41, 0.55);
46
+ line-height: 1.5;
47
+ }
@@ -1,6 +1,7 @@
1
1
  import './index.scss';
2
2
  interface SectionTitleProps {
3
3
  title: string;
4
+ description?: string;
4
5
  }
5
- export default function SectionTitle({ title }: SectionTitleProps): import("react/jsx-runtime").JSX.Element;
6
+ export default function SectionTitle({ title, description }: SectionTitleProps): import("react/jsx-runtime").JSX.Element;
6
7
  export {};
@@ -2,14 +2,21 @@ import "./index.scss";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { jsxs as _jsxs } from "react/jsx-runtime";
4
4
  export default function SectionTitle(_ref) {
5
- var title = _ref.title;
5
+ var title = _ref.title,
6
+ description = _ref.description;
6
7
  return /*#__PURE__*/_jsxs("div", {
7
- className: "section-title",
8
+ className: "section-title".concat(description ? ' section-title-with-desc' : ''),
8
9
  children: [/*#__PURE__*/_jsx("div", {
9
10
  className: "section-title-bar"
10
- }), /*#__PURE__*/_jsx("span", {
11
- className: "section-title-text",
12
- children: title
11
+ }), /*#__PURE__*/_jsxs("div", {
12
+ className: "section-title-content",
13
+ children: [/*#__PURE__*/_jsx("span", {
14
+ className: "section-title-text",
15
+ children: title
16
+ }), description && /*#__PURE__*/_jsx("div", {
17
+ className: "section-title-desc",
18
+ children: description
19
+ })]
13
20
  })]
14
21
  });
15
22
  }
@@ -20,3 +20,28 @@
20
20
  font-weight: 600;
21
21
  color: #1D2129;
22
22
  }
23
+
24
+ .section-title-with-desc {
25
+ height: auto;
26
+ align-items: flex-start;
27
+ padding: 12px 0;
28
+
29
+ .section-title-bar {
30
+ height: 100%;
31
+ min-height: 16px;
32
+ }
33
+
34
+ .section-title-content {
35
+ display: flex;
36
+ flex-direction: column;
37
+ gap: 4px;
38
+ line-height: 1.5;
39
+ }
40
+ }
41
+
42
+ .section-title-desc {
43
+ font-size: 12px;
44
+ font-weight: 400;
45
+ color: rgba(29, 33, 41, 0.55);
46
+ line-height: 1.5;
47
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@donglegeyu/company-ui",
3
- "version": "1.2.12",
3
+ "version": "1.2.13",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/es/index.js",
6
6
  "types": "dist/es/index.d.ts",