diff --git a/src/App.tsx b/src/App.tsx index 31f0484c9..3d63814a4 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -4,6 +4,7 @@ import { invoke } from '@tauri-apps/api'; import { Button } from './components/primative/Button'; import { Input, Toggle } from './components/primative'; import { InputContainer } from './components/primative/InputContainer'; +import { TrafficLights } from './components/os/trafficLights'; export default function App() { const fileUploader = useRef(null); @@ -14,15 +15,17 @@ export default function App() {
+ className="max-w p-2 bg-gray-50 dark:bg-gray-800 h-10 border-b border-gray-100 dark:border-gray-900 shadow-sm" + > + +
-
+
+
+ + +
diff --git a/src/components/os/trafficLights.tsx b/src/components/os/trafficLights.tsx new file mode 100644 index 000000000..e7ea85842 --- /dev/null +++ b/src/components/os/trafficLights.tsx @@ -0,0 +1,36 @@ +import clsx from 'clsx'; +import React from 'react'; +import { DefaultProps } from '../primative/types'; + +export interface TrafficLightsProps extends DefaultProps { + onClose?: () => void; + onMinimize?: () => void; + onFullscreen?: () => void; +} + +export const TrafficLights: React.FC = (props) => { + return ( +
+ + + +
+ ); +}; + +interface LightProps { + mode: 'close' | 'minimize' | 'fullscreen'; + action?: () => void; +} + +const Light: React.FC = (props) => { + return ( +
+ ); +}; diff --git a/src/components/primative/Button.tsx b/src/components/primative/Button.tsx index 839871074..441d351e3 100644 --- a/src/components/primative/Button.tsx +++ b/src/components/primative/Button.tsx @@ -3,6 +3,11 @@ import { ButtonHTMLAttributes, useState } from 'react'; import { Switch } from '@headlessui/react'; import clsx from 'clsx'; +const sizes = { + default: 'py-1 px-3 text-md font-medium', + sm: 'py-1 px-2 text-sm font-medium' +}; + const variants = { default: ` bg-gray-50 @@ -33,6 +38,7 @@ const variants = { interface ButtonProps extends React.ButtonHTMLAttributes { variant?: keyof typeof variants; + size?: keyof typeof sizes; loading?: boolean; } @@ -41,8 +47,9 @@ export const Button: React.FC = ({ loading, ...props }) => {