listpage-next 0.0.275 → 0.0.276

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,13 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { Container, ContentArea, Dot, DotsContainer, Header, Pre, SnippetLabel, SnippetLabelContainer } from "../styles/CodeComponent.styles.js";
3
- const Code = (props)=>/*#__PURE__*/ jsxs(Container, {
2
+ import { Container, ContentArea, Dot, DotsContainer, Header, InlineCode, Pre, SnippetLabel, SnippetLabelContainer } from "../styles/CodeComponent.styles.js";
3
+ const Code = (props)=>{
4
+ const { block, className, children, ...rest } = props;
5
+ if (!block) return /*#__PURE__*/ jsx(InlineCode, {
6
+ className: className,
7
+ ...rest,
8
+ children: children
9
+ });
10
+ return /*#__PURE__*/ jsxs(Container, {
4
11
  children: [
5
12
  /*#__PURE__*/ jsxs(Header, {
6
13
  children: [
@@ -23,16 +30,17 @@ const Code = (props)=>/*#__PURE__*/ jsxs(Container, {
23
30
  /*#__PURE__*/ jsx(SnippetLabelContainer, {
24
31
  className: "snippet-label",
25
32
  children: /*#__PURE__*/ jsx(SnippetLabel, {
26
- children: "Snippet"
33
+ children: "代码"
27
34
  })
28
35
  })
29
36
  ]
30
37
  }),
31
38
  /*#__PURE__*/ jsx(ContentArea, {
32
39
  children: /*#__PURE__*/ jsx(Pre, {
33
- children: props.children
40
+ children: children
34
41
  })
35
42
  })
36
43
  ]
37
44
  });
45
+ };
38
46
  export { Code };
@@ -9,3 +9,4 @@ export declare const SnippetLabelContainer: import("styled-components/dist/types
9
9
  export declare const SnippetLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
10
10
  export declare const ContentArea: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
11
11
  export declare const Pre: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLPreElement>, HTMLPreElement>, never>> & string;
12
+ export declare const InlineCode: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
@@ -74,4 +74,13 @@ const Pre = styled_components.pre`
74
74
  font-weight: 500;
75
75
  margin: 0;
76
76
  `;
77
- export { Container, ContentArea, Dot, DotsContainer, Header, Pre, SnippetLabel, SnippetLabelContainer };
77
+ const InlineCode = styled_components.code`
78
+ padding: 0.2em 0.4em;
79
+ margin: 0;
80
+ font-size: 85%;
81
+ background-color: rgba(175, 184, 193, 0.2);
82
+ border-radius: 6px;
83
+ font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
84
+ color: #24292f;
85
+ `;
86
+ export { Container, ContentArea, Dot, DotsContainer, Header, InlineCode, Pre, SnippetLabel, SnippetLabelContainer };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "listpage-next",
3
- "version": "0.0.275",
3
+ "version": "0.0.276",
4
4
  "description": "A React component library for creating filter forms with Ant Design",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",