diff --git a/package.json b/package.json index 919f244..5bd5b79 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@code4ro/reusable-components", - "version": "0.1.52", + "version": "0.1.53", "description": "Component library for code4ro", "keywords": [ "code4ro", diff --git a/src/components/ElectionCandidatesTableSection/ElectionCandidatesTableSection.module.scss b/src/components/ElectionCandidatesTableSection/ElectionCandidatesTableSection.module.scss index 81c1347..731a57e 100644 --- a/src/components/ElectionCandidatesTableSection/ElectionCandidatesTableSection.module.scss +++ b/src/components/ElectionCandidatesTableSection/ElectionCandidatesTableSection.module.scss @@ -14,8 +14,3 @@ th.heading { text-align: left; } - -.collapseButton { - margin-top: 0.5rem; - align-self: flex-end; -} diff --git a/src/components/ElectionCandidatesTableSection/ElectionCandidatesTableSection.stories.tsx b/src/components/ElectionCandidatesTableSection/ElectionCandidatesTableSection.stories.tsx index b49820e..1fa5050 100644 --- a/src/components/ElectionCandidatesTableSection/ElectionCandidatesTableSection.stories.tsx +++ b/src/components/ElectionCandidatesTableSection/ElectionCandidatesTableSection.stories.tsx @@ -3,7 +3,6 @@ import React from "react"; import { mockCandidatesList } from "../../util/mocks"; import { ElectionCandidatesTableSection } from "./ElectionCandidatesTableSection"; -import cssClasses from "./ElectionCandidatesTableSection.module.scss"; export default { title: "Election results candidates tables section", @@ -11,12 +10,5 @@ export default { }; export const SimpleExample = () => { - return ( - - ); + return ; }; diff --git a/src/components/ElectionCandidatesTableSection/ElectionCandidatesTableSection.tsx b/src/components/ElectionCandidatesTableSection/ElectionCandidatesTableSection.tsx index 5049d99..c7e84c7 100644 --- a/src/components/ElectionCandidatesTableSection/ElectionCandidatesTableSection.tsx +++ b/src/components/ElectionCandidatesTableSection/ElectionCandidatesTableSection.tsx @@ -8,13 +8,12 @@ import cssClasses from "./ElectionCandidatesTableSection.module.scss"; type Props = { heading: string; parties: ElectionResultsPartyCandidates[] | undefined; - ballot: string; }; export const ElectionCandidatesTableSection = themable( "ElectionCandidatesTableSection", cssClasses, -)(({ heading, parties, ballot }) => ( +)(({ heading, parties }) => (
@@ -25,7 +24,7 @@ export const ElectionCandidatesTableSection = themable( {parties && parties.map((party, index) => ( - + ))} diff --git a/src/components/ElectionPartyRow/ElectionPartyRow.module.scss b/src/components/ElectionPartyRow/ElectionPartyRow.module.scss index b672fe5..1594bf0 100644 --- a/src/components/ElectionPartyRow/ElectionPartyRow.module.scss +++ b/src/components/ElectionPartyRow/ElectionPartyRow.module.scss @@ -10,6 +10,7 @@ position: absolute; top: 50%; right: 10px; + transform: translatey(-50%); width: 0; height: 0; diff --git a/src/components/ElectionPartyRow/ElectionPartyRow.tsx b/src/components/ElectionPartyRow/ElectionPartyRow.tsx index 2ac8849..88827c1 100644 --- a/src/components/ElectionPartyRow/ElectionPartyRow.tsx +++ b/src/components/ElectionPartyRow/ElectionPartyRow.tsx @@ -6,14 +6,13 @@ import cssClasses from "./ElectionPartyRow.module.scss"; type Props = { name: string; - ballot: string; candidates: ElectionResultsPartyCandidate[]; }; export const ElectionPartyRow = themable( "ElectionPartyRow", cssClasses, -)(({ name, ballot, candidates }) => { +)(({ name, candidates }) => { const [expanded, setExpanded] = useState(false); const onExpandClick = useCallback(() => { @@ -37,7 +36,6 @@ export const ElectionPartyRow = themable( {candidates.map((candidate: ElectionResultsPartyCandidate) => ( {candidate.name} - {ballot} ))} diff --git a/src/stories/APIIntegration.stories.tsx b/src/stories/APIIntegration.stories.tsx index a6df384..555ec6d 100644 --- a/src/stories/APIIntegration.stories.tsx +++ b/src/stories/APIIntegration.stories.tsx @@ -131,7 +131,7 @@ export const ElectionCandidatesComponent = (args: { api: string; apiUrl: string return ( <> - {data && } + {data && } ); };