Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
61b9d811
Unverified
Commit
61b9d811
authored
Jan 15, 2021
by
Alex Khomenko
Committed by
GitHub
Jan 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Grafana UI: EmptySearchResult docs (#30281)
* Grafana-UI: Remove sass * Grafana-UI: Add story/docs
parent
ce3e34e9
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
11 deletions
+54
-11
packages/grafana-ui/src/components/EmptySearchResult/EmptySearchResult.mdx
+17
-0
packages/grafana-ui/src/components/EmptySearchResult/EmptySearchResult.story.tsx
+19
-0
packages/grafana-ui/src/components/EmptySearchResult/EmptySearchResult.tsx
+18
-2
packages/grafana-ui/src/components/EmptySearchResult/_EmptySearchResult.scss
+0
-8
packages/grafana-ui/src/components/index.scss
+0
-1
No files found.
packages/grafana-ui/src/components/EmptySearchResult/EmptySearchResult.mdx
0 → 100644
View file @
61b9d811
import { ArgsTable } from '@storybook/addon-docs/blocks';
import { EmptySearchResult } from './EmptySearchResult';
# EmptySearchResult
A styled container for a message, displayed when no search results are found. Used in the visualizations search, among others.
### Usage
```jsx
import { EmptySearchResult } from '@grafana/ui';
<EmptySearchResult>Could not find anything matching your query</EmptySearchResult>;
```
### Props
<ArgsTable of={EmptySearchResult} />
packages/grafana-ui/src/components/EmptySearchResult/EmptySearchResult.story.tsx
0 → 100644
View file @
61b9d811
import
React
from
'react'
;
import
{
EmptySearchResult
}
from
'./EmptySearchResult'
;
import
{
withCenteredStory
}
from
'@grafana/ui/src/utils/storybook/withCenteredStory'
;
import
mdx
from
'./EmptySearchResult.mdx'
;
export
default
{
title
:
'Visualizations/EmptySearchResult'
,
component
:
EmptySearchResult
,
decorators
:
[
withCenteredStory
],
parameters
:
{
docs
:
{
page
:
mdx
,
},
},
};
export
const
Basic
=
()
=>
{
return
<
EmptySearchResult
>
Could not find anything matching your query
</
EmptySearchResult
>;
};
packages/grafana-ui/src/components/EmptySearchResult/EmptySearchResult.tsx
View file @
61b9d811
import
React
,
{
FC
}
from
'react'
;
import
React
,
{
FC
}
from
'react'
;
import
{
GrafanaTheme
}
from
'@grafana/data'
;
import
{
css
}
from
'emotion'
;
import
{
useStyles
}
from
'../../themes'
;
export
interface
Props
{
export
interface
Props
{
children
:
JSX
.
Element
|
string
;
children
:
JSX
.
Element
|
string
;
}
}
const
EmptySearchResult
:
FC
<
Props
>
=
({
children
})
=>
{
const
EmptySearchResult
:
FC
<
Props
>
=
({
children
})
=>
{
return
<
div
className=
"empty-search-result"
>
{
children
}
</
div
>;
const
styles
=
useStyles
(
getStyles
);
return
<
div
className=
{
styles
.
container
}
>
{
children
}
</
div
>;
};
};
const
getStyles
=
(
theme
:
GrafanaTheme
)
=>
{
return
{
container
:
css
`
border-left: 3px solid
${
theme
.
palette
.
blue80
}
;
background-color:
${
theme
.
colors
.
bg2
}
;
padding:
${
theme
.
spacing
.
d
}
;
min-width: 350px;
border-radius:
${
theme
.
border
.
radius
.
md
}
;
margin-bottom:
${
theme
.
spacing
.
xl
}
;
`
,
};
};
export
{
EmptySearchResult
};
export
{
EmptySearchResult
};
packages/grafana-ui/src/components/EmptySearchResult/_EmptySearchResult.scss
deleted
100644 → 0
View file @
ce3e34e9
.empty-search-result
{
border-left
:
3px
solid
$info-box-border-color
;
background-color
:
$empty-list-cta-bg
;
padding
:
$spacer
;
min-width
:
350px
;
border-radius
:
$border-radius
;
margin-bottom
:
$spacer
*
2
;
}
packages/grafana-ui/src/components/index.scss
View file @
61b9d811
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
@import
'ColorPicker/ColorPicker'
;
@import
'ColorPicker/ColorPicker'
;
@import
'CustomScrollbar/CustomScrollbar'
;
@import
'CustomScrollbar/CustomScrollbar'
;
@import
'Drawer/Drawer'
;
@import
'Drawer/Drawer'
;
@import
'EmptySearchResult/EmptySearchResult'
;
@import
'FormField/FormField'
;
@import
'FormField/FormField'
;
@import
'PanelOptionsGrid/PanelOptionsGrid'
;
@import
'PanelOptionsGrid/PanelOptionsGrid'
;
@import
'RefreshPicker/RefreshPicker'
;
@import
'RefreshPicker/RefreshPicker'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment