Playlists: Don't show page header action during empty state + update docs (#104100)
don't show page header action when empty state is visible + update docs
This commit is contained in:
@@ -22,6 +22,8 @@ There are different variants to handle the most common empty state use cases. Th
|
||||
|
||||
Use when there is no data to display and you want to encourage the user to take an action. Usually either to complete some initial configuration, or to create an item.
|
||||
|
||||
If there is already a primary call to action button visible (e.g. in the page header), this should be hidden whilst the empty state is shown to avoid duplicate primary actions on the page.
|
||||
|
||||
```jsx
|
||||
import { EmptyState, LinkButton, TextLink } from '@grafana/ui';
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ export const PlaylistPage = () => {
|
||||
return (
|
||||
<Page
|
||||
actions={
|
||||
contextSrv.isEditor ? (
|
||||
contextSrv.isEditor && showSearch ? (
|
||||
<LinkButton href="/playlists/new">
|
||||
<Trans i18nKey="playlist-page.create-button.title">New playlist</Trans>
|
||||
</LinkButton>
|
||||
|
||||
Reference in New Issue
Block a user