-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: display a message when no options in the filter (#3292)
* refactor: display a message when no options * refactor: empty text component
- Loading branch information
1 parent
e9a2b0c
commit 28e70a8
Showing
13 changed files
with
67 additions
and
82 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import styled from '@emotion/styled'; | ||
import type { CSSProperties } from 'react'; | ||
import { FaRegEyeSlash } from 'react-icons/fa'; | ||
|
||
const EmptyContainer = styled.div` | ||
display: flex; | ||
justify-content: center; | ||
color: #6a6a6a; | ||
padding: 1.5rem 0; | ||
`; | ||
|
||
const Icon = styled(FaRegEyeSlash)` | ||
margin: 0 10px; | ||
font-size: 1.1rem; | ||
`; | ||
const Text = styled.span` | ||
font-size: 0.8rem; | ||
`; | ||
interface EmptyTextProps { | ||
text: string; | ||
style?: { text?: CSSProperties; icon?: CSSProperties }; | ||
} | ||
|
||
export function EmptyText(props: EmptyTextProps) { | ||
const { text, style = { text: {}, icon: {} } } = props; | ||
return ( | ||
<EmptyContainer> | ||
<Icon style={style.icon} /> | ||
<Text style={style.text}>{text}</Text> | ||
</EmptyContainer> | ||
); | ||
} |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import NoTableData from './NoTableData.js'; | ||
import { EmptyText } from '../../../elements/EmptyText.js'; | ||
|
||
export default function NoDataForFid() { | ||
return <NoTableData text="Not available for FID" />; | ||
export function NoDataForFid() { | ||
return <EmptyText text="Not available for FID" />; | ||
} |
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
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