Skip to content

Commit eab7876

Browse files
authored
chore: sort and filter for PR and issue tab working (#1931)
* chore: sort and filter for PR and issue tab working * chore: lint fix * chore: build fix * chore: sonar code smell fix * chore: sonar code smell fix * chore: sonar code duplication * chore: sonar duplication * chore: sonar duplication
1 parent 66f801b commit eab7876

34 files changed

Lines changed: 449 additions & 1042 deletions

cra-rxjs-styled-components/src/components/filter-dropdown/FilterDropdown.styles.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import colors from '../../constants/colors';
2-
import styled from 'styled-components';
2+
import styled, { css } from 'styled-components';
33

44
export const DropdownContainer = styled.div`
55
display: flex;
@@ -22,7 +22,7 @@ export const DropdownOptionsHeadingText = styled.span`
2222
font-weight: 700;
2323
`;
2424

25-
export const DropdownBtn = styled.button`
25+
export const DropdownBtn = styled.button<{ flat?: boolean }>`
2626
display: flex;
2727
flex-grow: 1;
2828
border-radius: 8px;
@@ -35,9 +35,19 @@ export const DropdownBtn = styled.button`
3535
min-width: 70px;
3636
outline: none;
3737
@media (min-width: 768px) {
38-
gap: 8px;
38+
${(props) =>
39+
!props.flat &&
40+
css`
41+
gap: 8px;
42+
`}
3943
min-width: 80px;
4044
}
45+
${(props) =>
46+
props.flat &&
47+
css`
48+
border: none;
49+
gap: 2px;
50+
`}
4151
`;
4252

4353
export const DropdownOption = styled.li`

cra-rxjs-styled-components/src/components/filter-dropdown/FilterDropdown.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ interface FilterDropdownProps {
2020
items?: string[];
2121
selected?: string;
2222
itemsColors?: string[];
23+
flat?: boolean;
2324
selectOption?: (value: string) => void;
2425
}
2526
export default function FilterDropdown({
2627
name,
2728
items,
2829
selected,
2930
itemsColors,
31+
flat,
3032
selectOption,
3133
}: FilterDropdownProps) {
3234
const [showOptions, setShowOptions] = useState(false);
@@ -62,7 +64,7 @@ export default function FilterDropdown({
6264
});
6365
return (
6466
<DropdownContainer ref={ref}>
65-
<DropdownBtn onClick={toggleOption}>
67+
<DropdownBtn flat={flat} onClick={toggleOption}>
6668
<DropdownBtnText>{name}</DropdownBtnText>
6769
<CaretIcon active={false} />
6870
</DropdownBtn>

cra-rxjs-styled-components/src/components/issue/Issue.stories.tsx

Lines changed: 0 additions & 94 deletions
This file was deleted.

cra-rxjs-styled-components/src/components/issue/Issue/Issue.data.tsx

Lines changed: 0 additions & 91 deletions
This file was deleted.

cra-rxjs-styled-components/src/components/issue/Issue/Issue.style.tsx

Lines changed: 0 additions & 112 deletions
This file was deleted.

cra-rxjs-styled-components/src/components/issue/Issue/Issue.type.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)