diff --git a/src/Popup.css b/src/Popup.css index 3ac139a..ecfa447 100644 --- a/src/Popup.css +++ b/src/Popup.css @@ -3,12 +3,15 @@ html { min-height: 300px; min-width: 300px; + height: 100%; } body { min-height: 300px; min-width: 300px; margin: 0; + height: 100%; + max-height: 100%; } .popup { @@ -18,3 +21,8 @@ body { justify-content: center; align-items: center; } + +#__plasmo { + height: 100%; + background-color: #0a0a10; +} diff --git a/src/components/Button.css b/src/components/Button.css new file mode 100644 index 0000000..e3fa721 --- /dev/null +++ b/src/components/Button.css @@ -0,0 +1,41 @@ +.button { + padding: 1rem; + border-radius: 10px; + border: 0; + font-size: 1rem; + text-align: center; + cursor: pointer; + transition: background-color 100ms ease-in-out, color 100ms ease-in-out, transform 100ms ease-in-out; +} + +.button.full { + width: 100%; +} + +.button, .button:focus, .button:active, .button:visited { + text-decoration: none; +} + +.button:active { + transform: scale(1.05); +} + +.button.button-secondary { + background-color: #222033; + color: white; +} + +.button.button-secondary:hover { + background-color: #2c2941; + color: white; +} + +.button.button-primary { + background-color: #4F328A; + color: white; +} + +.button.button-primary:hover { + background-color: #5E3F9D; + color: white; +} diff --git a/src/components/Button.tsx b/src/components/Button.tsx new file mode 100644 index 0000000..16cd148 --- /dev/null +++ b/src/components/Button.tsx @@ -0,0 +1,27 @@ +import type { ReactNode } from 'react'; + +import './Button.css'; + +export interface ButtonProps { + type?: 'primary' | 'secondary'; + href?: string; + children?: ReactNode; + onClick?: () => void; + full?: boolean; + className?: string; +} + +export function Button(props: ButtonProps) { + const classes = `button button-${props.type ?? 'primary'} ${props.className ?? ''} ${props.full ? 'full' : ''}`; + if (props.href) + return ( + + {props.children} + + ); + return ( + + ); +} diff --git a/src/components/PermissionMissingScreen.tsx b/src/components/PermissionMissingScreen.tsx deleted file mode 100644 index d37f83f..0000000 --- a/src/components/PermissionMissingScreen.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { useCallback } from 'react'; - -import { Icon } from '~components/Icon'; - -import '~tabs/PermissionGrant.css'; - -export function PermissionMissingScreen() { - const open = useCallback(() => { - const url = (chrome || browser).runtime.getURL(`/tabs/PermissionRequest.html`); - (chrome || browser).tabs.create({ url }); - }, []); - - return ( -
The extension is missing permissions it needs to function
- -+ To get started, we need to setup some things first. Click the button below to continue. +
+ +