@fe-free/core 1.2.2 → 1.2.4

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @fe-free/core
2
2
 
3
+ ## 1.2.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @fe-free/tool@1.2.4
9
+
10
+ ## 1.2.3
11
+
12
+ ### Patch Changes
13
+
14
+ - @fe-free/tool@1.2.3
15
+
3
16
  ## 1.2.2
4
17
 
5
18
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fe-free/core",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "",
5
5
  "main": "./src/index.ts",
6
6
  "author": "",
@@ -29,7 +29,7 @@
29
29
  "react-syntax-highlighter": "^15.5.0",
30
30
  "vanilla-jsoneditor": "^0.23.1",
31
31
  "zustand": "^4.5.4",
32
- "@fe-free/tool": "1.2.2"
32
+ "@fe-free/tool": "1.2.4"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "@ant-design/pro-components": "^2.7.15",
@@ -0,0 +1,29 @@
1
+ import { LoadingButton } from '@fe-free/core';
2
+
3
+ export default {
4
+ title: '@fe-free/core/LoadingButton',
5
+ component: LoadingButton,
6
+ tags: ['autodocs'],
7
+ };
8
+
9
+ export const Default = {
10
+ args: {
11
+ children: 'click and resolve',
12
+ onClick: () => {
13
+ return new Promise((resolve) => {
14
+ setTimeout(resolve, 1000);
15
+ });
16
+ },
17
+ },
18
+ };
19
+
20
+ export const Reject = {
21
+ args: {
22
+ children: 'click and reject',
23
+ onClick: () => {
24
+ return new Promise((_, reject) => {
25
+ setTimeout(reject, 1000);
26
+ });
27
+ },
28
+ },
29
+ };
@@ -0,0 +1,17 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ module.exports = {
3
+ theme: {
4
+ extend: {
5
+ colors: {
6
+ primary: '#1677ff',
7
+ /** 次要文本 */
8
+ secondary: 'rgba(0, 0, 0, 0.65)',
9
+ /** 描述文本 */
10
+ desc: 'rgba(0, 0, 0, 0.45)',
11
+ // 价格
12
+ price: '#E7484D',
13
+ },
14
+ },
15
+ },
16
+ plugins: [],
17
+ };
@@ -0,0 +1,18 @@
1
+ export default {
2
+ title: '@fe-free/core/tailwindcss',
3
+ tags: ['autodocs'],
4
+ };
5
+
6
+ export const Default = () => {
7
+ return (
8
+ <div>
9
+ <div>extends colors</div>
10
+ <div className="flex flex-row gap-2">
11
+ <span className="text-primary">text-primary</span>
12
+ <span className="text-secondary">text-secondary</span>
13
+ <span className="text-desc">text-desc</span>
14
+ <span className="text-price">text-price</span>
15
+ </div>
16
+ </div>
17
+ );
18
+ };
@@ -1,46 +0,0 @@
1
- ---
2
- group: 'core'
3
- toc: content
4
- ---
5
-
6
- # Button
7
-
8
- ## LoadingButton
9
-
10
- ```tsx
11
- import { LoadingButton } from '@fe-free/core';
12
-
13
- export default () => {
14
- return (
15
- <div>
16
- <LoadingButton
17
- onClick={() => {
18
- return;
19
- }}
20
- >
21
- 点击
22
- </LoadingButton>
23
-
24
- <LoadingButton
25
- onClick={() =>
26
- new Promise((resolve) => {
27
- setTimeout(resolve, 1000);
28
- })
29
- }
30
- >
31
- 点击 1000ms resolve
32
- </LoadingButton>
33
-
34
- <LoadingButton
35
- onClick={() =>
36
- new Promise((_, reject) => {
37
- setTimeout(reject, 1000);
38
- })
39
- }
40
- >
41
- 点击 1000ms reject
42
- </LoadingButton>
43
- </div>
44
- );
45
- };
46
- ```