From 6d4167809bab23d5670eeaf129b18fc7b1a7bd09 Mon Sep 17 00:00:00 2001 From: norman-andrians Date: Sat, 9 Mar 2024 18:28:28 +0700 Subject: [PATCH] Photoresistor --- src/components/forms/Button.tsx | 23 +++- src/components/forms/EvoInput.tsx | 2 +- src/components/info/TwoRowTab.tsx | 14 ++ .../landing/ControlPhotoresistor.tsx | 121 ++++++++++++++++++ src/components/shapes/CircleResistance.tsx | 39 ++++++ src/contexts/BoardController.tsx | 7 +- src/css/index.css | 17 +++ src/hooks/index.tsx | 31 +++++ src/pages/MainPage.tsx | 2 + tailwind.config.js | 1 + 10 files changed, 252 insertions(+), 5 deletions(-) create mode 100644 src/components/info/TwoRowTab.tsx create mode 100644 src/components/landing/ControlPhotoresistor.tsx create mode 100644 src/components/shapes/CircleResistance.tsx diff --git a/src/components/forms/Button.tsx b/src/components/forms/Button.tsx index 7f3458c..62edde6 100644 --- a/src/components/forms/Button.tsx +++ b/src/components/forms/Button.tsx @@ -15,7 +15,7 @@ function Primary ({ }: ButtonProps) { return ( @@ -30,7 +30,23 @@ function Secondary ({ }: ButtonProps) { return ( + ) +} + + +function Danger ({ + className, + style, + onClick, + children +}: ButtonProps) { + return ( + @@ -45,7 +61,7 @@ function Button ({ }: ButtonProps) { return ( @@ -54,5 +70,6 @@ function Button ({ Button.Primary = Primary; Button.Secondary = Secondary; +Button.Danger = Danger; export default Button; \ No newline at end of file diff --git a/src/components/forms/EvoInput.tsx b/src/components/forms/EvoInput.tsx index 2e8b7a9..26a8867 100644 --- a/src/components/forms/EvoInput.tsx +++ b/src/components/forms/EvoInput.tsx @@ -25,7 +25,7 @@ export default function EvoInput ({