-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
113 additions
and
29 deletions.
There are no files selected for viewing
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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from "react"; | ||
import { ProjectTitle } from "../ProjectTitle"; | ||
import { PolicyStance } from "./PolicyStance"; | ||
|
||
export const Filters: React.FC = () => { | ||
return ( | ||
<> | ||
<div className="px-6"> | ||
<ProjectTitle /> | ||
<PolicyStance /> | ||
</div> | ||
</> | ||
); | ||
}; |
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,51 @@ | ||
import React from "react"; | ||
|
||
const categories: string[] = [ | ||
"climate", | ||
"migration", | ||
"LGBTQ", | ||
"workers", | ||
"nhs", | ||
"benefits", | ||
"strikes", | ||
"public ownership", | ||
]; | ||
|
||
export const PolicyStance: React.FC = () => { | ||
return ( | ||
<div className="my-4"> | ||
<h3 className="w-full my-4 text-center font-bold text-lg"> | ||
Stance on policy | ||
</h3> | ||
<div className="flex flex-row justify-between mx-2"> | ||
<span>Negative</span> | ||
<span>Positive</span> | ||
</div> | ||
{categories.map((category) => ( | ||
<PositiveNegativeChoice category={category} /> | ||
))} | ||
</div> | ||
); | ||
}; | ||
|
||
const PositiveNegativeChoice: React.FC<{ | ||
category: string; | ||
positive?: boolean; | ||
}> = ({ category, positive }) => { | ||
const negative = positive !== undefined && !positive; | ||
return ( | ||
<div className="flex flex-row justify-between m-3"> | ||
<input | ||
type="checkbox" | ||
className="checkbox checkbox-bordered-error" | ||
checked={negative} | ||
/> | ||
<p className="flex align-middle text-center">{category}</p> | ||
<input | ||
type="checkbox" | ||
className="checkbox checkbox-bordered-success" | ||
checked={positive} | ||
/> | ||
</div> | ||
); | ||
}; |