-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tdl-1933-[cra-rxjs-sc]-feat: added no result for filters in prs and i…
…ssues page (#1940) * fix: wip * fix: added no result for filters in issues and prs page
- Loading branch information
Showing
8 changed files
with
122 additions
and
26 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
cra-rxjs-styled-components/src/components/empty-result/EmptyResult.styles.ts
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,19 @@ | ||
import colors from '../../constants/colors'; | ||
import styled from 'styled-components'; | ||
|
||
export const Container = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
padding: 16px 0; | ||
width: 100%; | ||
`; | ||
|
||
export const Header = styled.h3` | ||
font-size: 24px; | ||
line-height: 32px; | ||
font-weight: 600; | ||
color: ${colors.gray900}; | ||
text-align: center; | ||
margin: 16px 0; | ||
`; |
22 changes: 22 additions & 0 deletions
22
cra-rxjs-styled-components/src/components/empty-result/EmptyResult.tsx
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,22 @@ | ||
import IssueIcon from '../icons/IssueIcon'; | ||
import PullRequestIcon from '../icons/PullRequestIcon'; | ||
import { Container, Header } from './EmptyResult.styles'; | ||
|
||
interface IssuesEmptyProps { | ||
icon?: 'pr' | 'issue'; | ||
text: string; | ||
} | ||
const EmptyResult = ({ icon, text }: IssuesEmptyProps) => { | ||
return ( | ||
<Container data-testid="issues-empty"> | ||
{icon && icon === 'pr' ? ( | ||
<PullRequestIcon height={32} width={32} /> | ||
) : ( | ||
<IssueIcon height={32} width={32} /> | ||
)} | ||
<Header>{text}</Header> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default EmptyResult; |
21 changes: 15 additions & 6 deletions
21
cra-rxjs-styled-components/src/components/icons/IssueIcon.tsx
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
16 changes: 11 additions & 5 deletions
16
cra-rxjs-styled-components/src/components/icons/PullRequestIcon.tsx
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