From d49230c88d587ae77bf2d55763b1f39874bd3f60 Mon Sep 17 00:00:00 2001 From: aeschi Date: Tue, 23 Jul 2024 13:22:04 +0200 Subject: [PATCH] feat: add primary and secondary button --- src/App.tsx | 20 +++++++++++++- src/components/buttons/icons/send-icon.tsx | 16 +++++++++++ src/components/buttons/primary.tsx | 31 ++++++++++++++++++++++ src/components/buttons/secondary.tsx | 31 ++++++++++++++++++++++ tailwind.config.js | 13 ++++++++- 5 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 src/components/buttons/icons/send-icon.tsx create mode 100644 src/components/buttons/primary.tsx create mode 100644 src/components/buttons/secondary.tsx diff --git a/src/App.tsx b/src/App.tsx index e0de863..2d0d3a5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,3 +1,21 @@ +import { SendIcon } from "./components/buttons/icons/send-icon"; +import { PrimaryButton } from "./components/buttons/primary"; +import { SecondaryButton } from "./components/buttons/secondary"; + export function App() { - return

BärGPT - KI Testumgebung

; + return ( +
+

BärGPT - KI Testumgebung

+ + + Senden +
+ } + ariaLabel="Nachricht abschicken" + /> + + + ); } diff --git a/src/components/buttons/icons/send-icon.tsx b/src/components/buttons/icons/send-icon.tsx new file mode 100644 index 0000000..4ad17f2 --- /dev/null +++ b/src/components/buttons/icons/send-icon.tsx @@ -0,0 +1,16 @@ +import React from "react"; + +export const SendIcon: React.FC = () => ( + + + +); diff --git a/src/components/buttons/primary.tsx b/src/components/buttons/primary.tsx new file mode 100644 index 0000000..bfe6cff --- /dev/null +++ b/src/components/buttons/primary.tsx @@ -0,0 +1,31 @@ +import React from "react"; + +export interface PrimaryButtonProps { + label: string | React.ReactNode; + onClick?: () => void; + disabled?: boolean; + type?: "button" | "submit"; + ariaLabel?: string; + isLoading?: boolean; +} + +export const PrimaryButton: React.FC = ({ + label, + onClick, + disabled, + type = "button", + ariaLabel, +}) => { + return ( + + ); +}; diff --git a/src/components/buttons/secondary.tsx b/src/components/buttons/secondary.tsx new file mode 100644 index 0000000..f493794 --- /dev/null +++ b/src/components/buttons/secondary.tsx @@ -0,0 +1,31 @@ +import React from "react"; + +export interface PrimaryButtonProps { + label: string | React.ReactNode; + onClick?: () => void; + disabled?: boolean; + type?: "button" | "submit"; + ariaLabel?: string; + isLoading?: boolean; +} + +export const SecondaryButton: React.FC = ({ + label, + onClick, + disabled, + type = "button", + ariaLabel, +}) => { + return ( + + ); +}; diff --git a/tailwind.config.js b/tailwind.config.js index f7de5e9..9999209 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,8 +1,19 @@ /** @type {import('tailwindcss').Config} */ +// eslint-disable-next-line @technologiestiftung/no-default-export export default { content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"], theme: { - extend: {}, + extend: { + colors: { + "dark-blue": "#1C2554", + "light-blue": "#A9C9E7", + "light-grey": "#F2F2F2", + "mid-grey": "#D7D7D7", + }, + fontFamily: { + arial: ["Arial"], + }, + }, }, plugins: [], };