-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: removes EmptyBlock in favour of XEmptyState
Signed-off-by: John Cowen <john.cowen@konghq.com>
- Loading branch information
Showing
12 changed files
with
95 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# XEmptyState | ||
|
||
A lot of the time, generally when dealing with collections of data, you should | ||
be using `DataCollection` instead of `XEmptyState`. `DataCollection` will | ||
automatically show an `XEmptyState` when it detects that the collection of data | ||
is empty. | ||
|
||
`DataCollections` also have an `#empty` slot which allows you to pass in an | ||
`XEmptyState`. | ||
|
||
That being said, there are some cases where you'll need to use an `XEmptyState` | ||
on its own. | ||
|
||
`XEmptyState` has a very boring default state: | ||
|
||
<Story> | ||
<XEmptyState /> | ||
</Story> | ||
|
||
But it also has title and default slots to allow you to alter the text. Please | ||
use semantic elements when changing the default state. You should use `p` tags | ||
or `<div v-html="t('markdown')" />` for default/body content and the correct | ||
level of `h*` tag for the title depending on your page and the position/level | ||
of the empty state. | ||
|
||
<Story> | ||
<XEmptyState> | ||
<template | ||
#title | ||
> | ||
<h2>A different empty state title</h2> | ||
</template> | ||
<p> | ||
Different empty state content/body | ||
</p> | ||
</XEmptyState> | ||
</Story> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
:key="title" | ||
> | ||
<KEmptyState | ||
class="x-empty-state" | ||
data-testid="empty-block" | ||
> | ||
<template | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.