From 26e467982758ad18269358ebdbd6183684629fc1 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Wed, 10 Nov 2021 23:45:17 +0100 Subject: [PATCH] remove loads of styles in favor of inline styles --- components/book/dateSelect.tsx | 27 ++++++++-------- components/book/index.tsx | 4 +-- components/book/reason.tsx | 2 ++ components/footer.tsx | 6 ++-- components/input.tsx | 7 +++-- components/inputWrapper.tsx | 6 ++-- components/layout.tsx | 2 +- pages/_app.tsx | 2 +- pages/admin/bookings/[uuid]/bill.tsx | 2 +- pages/bookings/[uuid]/index.tsx | 12 ++------ pages/index.tsx | 12 ++++---- styles/index.css | 46 ---------------------------- 12 files changed, 39 insertions(+), 89 deletions(-) diff --git a/components/book/dateSelect.tsx b/components/book/dateSelect.tsx index a95f87b..51cc056 100644 --- a/components/book/dateSelect.tsx +++ b/components/book/dateSelect.tsx @@ -1,6 +1,7 @@ import React, { useContext } from 'react' import { BookContext } from '../../context/book' import InputWrapper from '../inputWrapper' +import Input from '../input' import Calendar from '../calendar' export default function DateSelect() { @@ -18,29 +19,26 @@ export default function DateSelect() { onChange={onChange} className="my-6 max-w-lg" /> -
-
- - +
+
+
-
- - +
- ) } diff --git a/components/book/index.tsx b/components/book/index.tsx index 60cb52a..b6466ea 100644 --- a/components/book/index.tsx +++ b/components/book/index.tsx @@ -11,7 +11,7 @@ function BookForm() { return ( <>
{ event.preventDefault() onSubmit() @@ -22,7 +22,7 @@ function BookForm() { {dataStoredLoaded && (

Buchungsdaten wurden aus Deinem Browser geladen und vorausgefüllt.{' '} - + Daten wieder vergessen

diff --git a/components/book/reason.tsx b/components/book/reason.tsx index 14a6d4c..14cd237 100644 --- a/components/book/reason.tsx +++ b/components/book/reason.tsx @@ -14,12 +14,14 @@ export default function Contact() { name="purpose" value={purpose} onChange={onChangeEvent} + className="" /> ) diff --git a/components/footer.tsx b/components/footer.tsx index 358c37b..ef7da38 100644 --- a/components/footer.tsx +++ b/components/footer.tsx @@ -8,7 +8,7 @@ export default function Footer() {
- + @@ -16,12 +16,12 @@ export default function Footer() { diff --git a/components/input.tsx b/components/input.tsx index dee9518..e926298 100644 --- a/components/input.tsx +++ b/components/input.tsx @@ -7,14 +7,17 @@ type InputProps = React.InputHTMLAttributes & { } export default function Input(props: InputProps) { - const { label, name, required, type = 'text', ...rest } = props + const { label, name, required, type = 'text', className = "", ...rest } = props + + const defaultClasses = "appearance-none bg-gray-50 text-gray-500 border rounded py-2 px-3 mb-3 leading-tight disabled:bg-gray-200 disabled:cursor-not-allowed focus: outline-none focus:bg-white w-full" + const classes = `${defaultClasses} ${className}`; return ( -
-
-