Skip to content

Commit

Permalink
chore: sort and filter for PR and issue tab working (#1931)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
hdJerry authored Aug 17, 2023
1 parent 66f801b commit eab7876
Show file tree
Hide file tree
Showing 34 changed files with 449 additions and 1,042 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import colors from '../../constants/colors';
import styled from 'styled-components';
import styled, { css } from 'styled-components';

export const DropdownContainer = styled.div`
display: flex;
Expand All @@ -22,7 +22,7 @@ export const DropdownOptionsHeadingText = styled.span`
font-weight: 700;
`;

export const DropdownBtn = styled.button`
export const DropdownBtn = styled.button<{ flat?: boolean }>`
display: flex;
flex-grow: 1;
border-radius: 8px;
Expand All @@ -35,9 +35,19 @@ export const DropdownBtn = styled.button`
min-width: 70px;
outline: none;
@media (min-width: 768px) {
gap: 8px;
${(props) =>
!props.flat &&
css`
gap: 8px;
`}
min-width: 80px;
}
${(props) =>
props.flat &&
css`
border: none;
gap: 2px;
`}
`;

export const DropdownOption = styled.li`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ interface FilterDropdownProps {
items?: string[];
selected?: string;
itemsColors?: string[];
flat?: boolean;
selectOption?: (value: string) => void;
}
export default function FilterDropdown({
name,
items,
selected,
itemsColors,
flat,
selectOption,
}: FilterDropdownProps) {
const [showOptions, setShowOptions] = useState(false);
Expand Down Expand Up @@ -62,7 +64,7 @@ export default function FilterDropdown({
});
return (
<DropdownContainer ref={ref}>
<DropdownBtn onClick={toggleOption}>
<DropdownBtn flat={flat} onClick={toggleOption}>
<DropdownBtnText>{name}</DropdownBtnText>
<CaretIcon active={false} />
</DropdownBtn>
Expand Down
94 changes: 0 additions & 94 deletions cra-rxjs-styled-components/src/components/issue/Issue.stories.tsx

This file was deleted.

This file was deleted.

112 changes: 0 additions & 112 deletions cra-rxjs-styled-components/src/components/issue/Issue/Issue.style.tsx

This file was deleted.

This file was deleted.

Loading

0 comments on commit eab7876

Please sign in to comment.