From 75e6a93b9243313f605ec9fc8ea95ae22e322e99 Mon Sep 17 00:00:00 2001 From: lzear Date: Sat, 11 Feb 2023 10:23:32 +0100 Subject: [PATCH] Continue changing Antd components to Chakra-UI --- demo/package.json | 1 - demo/src/ballots.tsx | 7 +- demo/src/candidates.tsx | 19 +- demo/src/layout/headings.tsx | 8 + demo/src/list-votes-group.tsx | 12 +- demo/src/matrix.tsx | 7 +- demo/src/methods/borda/result.tsx | 4 +- demo/src/methods/borda/viz-borda.tsx | 2 +- .../src/methods/instant-runoff/viz-rounds.tsx | 13 +- demo/src/methods/viz/scores-summary.tsx | 10 +- demo/src/results.tsx | 4 +- demo/src/sandbox.tsx | 4 +- demo/src/select-method.tsx | 23 +- demo/src/select-premade.tsx | 19 +- yarn.lock | 1238 ++++++++++++++++- 15 files changed, 1281 insertions(+), 90 deletions(-) create mode 100644 demo/src/layout/headings.tsx diff --git a/demo/package.json b/demo/package.json index 2944e0f..1e495e4 100644 --- a/demo/package.json +++ b/demo/package.json @@ -34,7 +34,6 @@ "@types/numeral": "^2.0.2", "@types/react": "18.0.27", "@use-gesture/react": "^10.2.24", - "antd": "^4.24.1", "babel-preset-next": "^1.4.0", "d3": "^7.8.2", "d3-dispatch": "^3.0.1", diff --git a/demo/src/ballots.tsx b/demo/src/ballots.tsx index ca2ee7b..8b7d50e 100644 --- a/demo/src/ballots.tsx +++ b/demo/src/ballots.tsx @@ -5,7 +5,7 @@ import { selectNormalizeWeights100, } from './store/selectors' import { totalWeight } from './generate-ballots' -import { Button, Text } from '@chakra-ui/react' +import { Button } from '@chakra-ui/react' import { ArrowRightOutlined, DeleteOutlined, @@ -13,6 +13,7 @@ import { MinusOutlined, PlusOutlined, } from '@ant-design/icons' +import { H4 } from './layout/headings' export const BallotsComp = () => { const groupedBallots = useStore(selectBallots) @@ -22,7 +23,7 @@ export const BallotsComp = () => { const normalizeWeights100 = useStore(selectNormalizeWeights100) return (
- {totalW} voters +

{totalW} voters

Preferences can be edited by clicking the buttons @@ -39,7 +40,7 @@ export const BallotsComp = () => { +1 random vote