Skip to content

Commit

Permalink
fix: remove second dropdown and updated UI as per figma
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiragPansuriya-iView committed Feb 21, 2024
1 parent 1580363 commit a44886d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 159 deletions.
4 changes: 2 additions & 2 deletions packages/components/sorts/SearchInputRounded.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export const SearchInputRounded: React.FC<{
return (
<PrimaryBox
style={{
padding: 10,
width: 313,
padding: layout.spacing_x1,
width: 471,
flexDirection: "row",
alignItems: "center",
borderColor: neutral33,
Expand Down
6 changes: 2 additions & 4 deletions packages/screens/Governance/GovernanceScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React, { useEffect, useMemo, useState } from "react";
import { View } from "react-native";

import { PeriodDropdown } from "./components/dropdowns/PeriodDropdown";
import { ProposalsDropdown } from "./components/dropdowns/ProposalsDropdown";
import { StatesDropdown } from "./components/dropdowns/StatesDropdown";
import { GovernanceBox } from "../../components/GovernanceBox/GovernanceBox";

import { BrandText } from "@/components/BrandText";
Expand Down Expand Up @@ -69,8 +68,7 @@ export const GovernanceScreen: React.FC = () => {
<SearchInputRounded
handleChangeSearch={(text) => setSearchInput(text)}
/>
<PeriodDropdown onChange={setFilter} style={{ zIndex: 100 }} />
<ProposalsDropdown onChange={() => {}} style={{ zIndex: 100 }} />
<StatesDropdown onChange={setFilter} style={{ zIndex: 100 }} />
</View>
</View>

Expand Down
147 changes: 0 additions & 147 deletions packages/screens/Governance/components/dropdowns/ProposalsDropdown.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import { SVG } from "@/components/SVG";
import { Separator } from "@/components/separators/Separator";
import { SpacerColumn } from "@/components/spacer";
import { useDropdowns } from "@/hooks/useDropdowns";
import { neutral55, secondaryColor } from "@/utils/style/colors";
import { neutral33, neutral55, secondaryColor } from "@/utils/style/colors";
import { fontMedium14, fontSemibold14 } from "@/utils/style/fonts";
import { layout } from "@/utils/style/layout";
import { ProposalStatus } from "@/utils/types/gov";

const def = {
all: {
name: "All Periods",
name: "States in Period",
filter: undefined,
},
voting: {
Expand All @@ -33,12 +33,12 @@ const def = {
},
};

interface PeriodDropdownGovProps {
interface StatesDropdownGovProps {
style?: ViewStyle;
onChange: (filter?: ProposalStatus) => void;
}

export const PeriodDropdown = ({ style, onChange }: PeriodDropdownGovProps) => {
export const StatesDropdown = ({ style, onChange }: StatesDropdownGovProps) => {
const [isDropdownOpen, setDropdownState, ref] = useDropdowns();
const [selected, setSelected] = useState<keyof typeof def>("all");

Expand All @@ -55,7 +55,7 @@ export const PeriodDropdown = ({ style, onChange }: PeriodDropdownGovProps) => {
>
<View
style={{
backgroundColor: "#292929",
backgroundColor: neutral33,
borderWidth: 1,
borderRadius: 8,
}}
Expand Down Expand Up @@ -106,7 +106,7 @@ export const PeriodDropdown = ({ style, onChange }: PeriodDropdownGovProps) => {
width: "100%",
paddingHorizontal: layout.spacing_x1_5,
paddingBottom: layout.spacing_x1,
backgroundColor: "#292929",
backgroundColor: neutral33,
borderBottomEndRadius: 8,
borderBottomLeftRadius: 8,
alignItems: "flex-start",
Expand Down

0 comments on commit a44886d

Please sign in to comment.