Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #90

Merged
merged 2 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/components/VacanciesFound/VacanciesFound.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { render, screen } from '@testing-library/react';
import { expect } from '@jest/globals';
import VacanciesFound from './VacanciesFound';

describe('VacanciesFound component', () => {
let container: HTMLElement;

beforeEach(() => {
container = render(<VacanciesFound allVacancies={'255'} />).container;
});

it('should be defined', () => {
expect(container).toBeDefined();
});
it('to be render allVacancies', () => {
screen.getByText('255 vagas encontradas');
});
});
29 changes: 29 additions & 0 deletions src/components/VacanciesFound/VacanciesFound.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import Text from '@components/Text';
import * as S from './styles';

type props = {
allVacancies: string;
};

const VacanciesFound = ({ allVacancies }: props) => {
return (
<S.Container>
<Text
label={
<p>
Vagas em <b>React</b>
</p>
}
fontSize="large"
fontColor="purple-dark"
/>
<Text
label={`${allVacancies} vagas encontradas`}
fontSize="medium"
fontColor="dark-gray"
/>
</S.Container>
);
};

export default VacanciesFound;
1 change: 1 addition & 0 deletions src/components/VacanciesFound/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './VacanciesFound';
15 changes: 15 additions & 0 deletions src/components/VacanciesFound/styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import styled from 'styled-components';

export const Container = styled.section`
display: flex;
flex-direction: column;
padding: 3rem 0px 0px 8.438rem;

.text {
justify-content: flex-start;
}

b {
font-weight: bold;
}
`;
2 changes: 2 additions & 0 deletions src/pages/VacanciesPage/VacanciesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import useResource from '@hooks/useResource';
import useFetchResource from '@hooks/useFetchResource';

import * as S from './styles';
import VacanciesFound from '@components/VacanciesFound';

const VacanciesPage = () => {
const { query } = useContext(queryContext);
Expand All @@ -27,6 +28,7 @@ const VacanciesPage = () => {
return (
<S.VacanciesPage data-cy="vacancies-page">
<SearchBar />
<VacanciesFound allVacancies={'255'} />
<S.Content>
<Filter />
<S.VacancyChartContainer>
Expand Down
2 changes: 1 addition & 1 deletion src/styles/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default createGlobalStyle`
--purple-dark-secondary: #6950A1;
--white: #FFFFFF;
--gray: #A6A8AB;
--dark-grey: #4A4A68;
--dark-gray: #4A4A68;
--gray-medium: #8C8CA1;
--gray-light: #D1D1D1;
--yellow: #FBB04D;
Expand Down