From 9fdc297686557ca87f3a3cb79a1497a577926797 Mon Sep 17 00:00:00 2001 From: Cherry7 <79909910+CCherry07@users.noreply.github.com> Date: Sun, 7 May 2023 20:33:24 +0800 Subject: [PATCH] docs(button): update demo with space (#6536) * feat(button): demo space * test(button): update demo snap * chore(button): disabled demo Ghost space * test(button): update disabled demo snap --- .../__tests__/__snapshots__/demo.test.js.snap | 530 +++++++++++------- components/button/demo/basic.vue | 12 +- components/button/demo/block.vue | 12 +- components/button/demo/button-group.vue | 1 - components/button/demo/danger.vue | 4 +- components/button/demo/disabled.vue | 69 ++- components/button/demo/ghost.vue | 12 +- components/button/demo/icon.vue | 100 +--- components/button/demo/loading.vue | 36 +- components/button/demo/multiple.vue | 32 +- components/button/demo/size.vue | 84 +-- 11 files changed, 507 insertions(+), 385 deletions(-) diff --git a/components/button/__tests__/__snapshots__/demo.test.js.snap b/components/button/__tests__/__snapshots__/demo.test.js.snap index dd0b59672..a706d9d1d 100644 --- a/components/button/__tests__/__snapshots__/demo.test.js.snap +++ b/components/button/__tests__/__snapshots__/demo.test.js.snap @@ -1,39 +1,53 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders ./components/button/demo/basic.vue correctly 1`] = ` - - - - - +
+
+ +
+ +
+ +
+ +
+ +
`; exports[`renders ./components/button/demo/block.vue correctly 1`] = ` - - - - - +
+
+ +
+ +
+ +
+ +
+ +
`; exports[`renders ./components/button/demo/button-group.vue correctly 1`] = ` @@ -71,186 +85,322 @@ exports[`renders ./components/button/demo/button-group.vue correctly 1`] = ` `; exports[`renders ./components/button/demo/danger.vue correctly 1`] = ` -
+
+
+ +
+ +
+ +
+ +
+ +
`; exports[`renders ./components/button/demo/disabled.vue correctly 1`] = ` - - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
-
+
+
+
+
+ +
+ +
+
+ +
+
+
+ +
+ +
+
+ +
+
+
+ +
+ +
+
+ +
+
+
+ +
+ +
+
+ +
+
+
+ +
+ +
+
+ +
+
+
+ +
+ +
+
+ +
+
+
+ +
+ +
+
+ +
+
+
+ +
+ +
+
+ +
+
+
+
+ +
+ +
+
+
+ +
`; exports[`renders ./components/button/demo/ghost.vue correctly 1`] = ` -
+
+
+
+ +
+ +
+ +
+ +
+
`; exports[`renders ./components/button/demo/icon.vue correctly 1`] = ` - - - - - - - - - - -
-
- - - - - -
- - - - - +
+
+
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+ +
+
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+ +
`; exports[`renders ./components/button/demo/loading.vue correctly 1`] = ` -
-
+
+
+
+
+ +
+ +
+
-
+
+
+
+ +
+ +
+
-
-
-
- -
- -
-
-
- -
- -
+
+
+
+ +
+ +
+ +
+
`; exports[`renders ./components/button/demo/multiple.vue correctly 1`] = ` - - - +
+
+ +
+ +
+ +
+ +
`; exports[`renders ./components/button/demo/size.vue correctly 1`] = ` -
-
-
- - - - - -
- - - - - -
+
+
+
+
+ +
+
+
+ +
+ +
+ +
+ +
+ +
+
+ +
+
+
+ +
+ +
+ +
+ +
+ +
+
+ +
`; diff --git a/components/button/demo/basic.vue b/components/button/demo/basic.vue index ff7893f34..c42c6105b 100644 --- a/components/button/demo/basic.vue +++ b/components/button/demo/basic.vue @@ -17,9 +17,11 @@ There are `primary` button, `default` button, `dashed` button, `text` button and diff --git a/components/button/demo/block.vue b/components/button/demo/block.vue index 1d9a65a65..888e36d47 100644 --- a/components/button/demo/block.vue +++ b/components/button/demo/block.vue @@ -16,9 +16,11 @@ title: diff --git a/components/button/demo/button-group.vue b/components/button/demo/button-group.vue index d142bdbd8..8cfffbce1 100644 --- a/components/button/demo/button-group.vue +++ b/components/button/demo/button-group.vue @@ -34,7 +34,6 @@ Debug usage M R -

With Icon

diff --git a/components/button/demo/danger.vue b/components/button/demo/danger.vue index afbcead11..82bed2089 100644 --- a/components/button/demo/danger.vue +++ b/components/button/demo/danger.vue @@ -17,11 +17,11 @@ danger is a property of button after antd 2.2.0. diff --git a/components/button/demo/disabled.vue b/components/button/demo/disabled.vue index 6b3e09e68..836951b13 100644 --- a/components/button/demo/disabled.vue +++ b/components/button/demo/disabled.vue @@ -16,33 +16,44 @@ To mark a button as disabled, add the `disabled` property to the `Button`. diff --git a/components/button/demo/ghost.vue b/components/button/demo/ghost.vue index c36838fe3..9637d784f 100644 --- a/components/button/demo/ghost.vue +++ b/components/button/demo/ghost.vue @@ -17,10 +17,12 @@ title: diff --git a/components/button/demo/icon.vue b/components/button/demo/icon.vue index f820cb47d..b0a702d59 100644 --- a/components/button/demo/icon.vue +++ b/components/button/demo/icon.vue @@ -20,82 +20,32 @@ If you want specific control over the positioning and placement of the `Icon`, t diff --git a/components/button/demo/loading.vue b/components/button/demo/loading.vue index 750337ddc..96d3ce985 100644 --- a/components/button/demo/loading.vue +++ b/components/button/demo/loading.vue @@ -16,23 +16,25 @@ A loading indicator can be added to a button by setting the `loading` property o