diff --git a/apps/trading/tailwind.config.js b/apps/trading/tailwind.config.js index 1791478d2..6bb81b572 100644 --- a/apps/trading/tailwind.config.js +++ b/apps/trading/tailwind.config.js @@ -9,6 +9,8 @@ module.exports = { ...createGlobPatternsForDependencies(__dirname), ], darkMode: 'class', - theme, + theme: { + extend: theme, + }, plugins: [], }; diff --git a/libs/react-helpers/src/lib/vega-wallet/connect-dialog.tsx b/libs/react-helpers/src/lib/vega-wallet/connect-dialog.tsx index 8b788f022..0035b61ec 100644 --- a/libs/react-helpers/src/lib/vega-wallet/connect-dialog.tsx +++ b/libs/react-helpers/src/lib/vega-wallet/connect-dialog.tsx @@ -44,7 +44,11 @@ export function VegaConnectDialog({ }, [selectedConnector, connectAndClose]); return ( - + {selectedConnector instanceof RestConnector ? ( ) : ( -
+
    {Object.entries(connectors).map(([key, connector]) => ( - +
  • + +

    {connector.description}

    +
  • ))} -
+ )}
); diff --git a/libs/react-helpers/src/lib/vega-wallet/connectors.ts b/libs/react-helpers/src/lib/vega-wallet/connectors.ts index 8c7c610ec..5d3b3bb4d 100644 --- a/libs/react-helpers/src/lib/vega-wallet/connectors.ts +++ b/libs/react-helpers/src/lib/vega-wallet/connectors.ts @@ -7,6 +7,9 @@ import { import { LocalStorage } from '@vegaprotocol/storage'; export interface VegaConnector { + /** Description of how to use this connector */ + description: string; + /** Connect to wallet and return keys */ connect(): Promise; @@ -28,6 +31,7 @@ export class RestConnector implements VegaConnector { static storageKey = 'vega_wallet'; apiConfig: Configuration; service: DefaultApi; + description = 'Connects using REST to the Vega wallet desktop app'; constructor() { const cfg = this.getConfig(); @@ -118,6 +122,8 @@ export class RestConnector implements VegaConnector { * Dummy injected connector that we may use when browser wallet is implemented */ export class InjectedConnector implements VegaConnector { + description = 'Connects using the Vega wallet browser extension'; + async connect() { return [ { diff --git a/libs/react-helpers/src/lib/vega-wallet/rest-connector-form.tsx b/libs/react-helpers/src/lib/vega-wallet/rest-connector-form.tsx index 6c3bc1bfa..9ba81c068 100644 --- a/libs/react-helpers/src/lib/vega-wallet/rest-connector-form.tsx +++ b/libs/react-helpers/src/lib/vega-wallet/rest-connector-form.tsx @@ -22,7 +22,7 @@ export function RestConnectorForm({ } = useForm({ // TODO: Remove default values defaultValues: { - wallet: 'test', + wallet: 'matt', passphrase: '123', }, }); @@ -64,7 +64,9 @@ export function RestConnectorForm({ /> {errors.passphrase?.message &&
{errors.passphrase.message}
} - + ); } diff --git a/libs/ui-toolkit/src/components/dialog/index.tsx b/libs/ui-toolkit/src/components/dialog/index.tsx index f2e06586e..3a2b774fd 100644 --- a/libs/ui-toolkit/src/components/dialog/index.tsx +++ b/libs/ui-toolkit/src/components/dialog/index.tsx @@ -5,14 +5,16 @@ interface DialogProps { children: ReactNode; open: boolean; setOpen: (isOpen: boolean) => void; + title?: string; } -export function Dialog({ children, open, setOpen }: DialogProps) { +export function Dialog({ children, open, setOpen, title }: DialogProps) { return ( setOpen(x)}> - + + {title &&

{title}

} {children}