Skip to content

Commit

Permalink
feat(wallet-dashboard): kickoff apps-ui-kit setup (#3636)
Browse files Browse the repository at this point in the history
* fix: kickoff apps-ui-kit setup

* fix format

* fix: avoid depending on node_modules

* fix: update import
  • Loading branch information
evavirseda authored Oct 25, 2024
1 parent 8e89d86 commit 19f63b3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
5 changes: 3 additions & 2 deletions apps/wallet-dashboard/app/dashboard/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
// SPDX-License-Identifier: Apache-2.0
'use client';

import { Button, Notifications, RouteLink } from '@/components/index';
import { Notifications, RouteLink } from '@/components/index';
import React, { useState, type PropsWithChildren } from 'react';
import { ConnectButton } from '@iota/dapp-kit';
import { Button } from '@iota/apps-ui-kit';

const routes = [
{ title: 'Home', path: '/dashboard/home' },
Expand Down Expand Up @@ -36,7 +37,7 @@ function DashboardLayout({ children }: PropsWithChildren): JSX.Element {
{routes.map((route) => {
return <RouteLink key={route.title} {...route} />;
})}
<Button onClick={toggleDarkMode}>{isDarkMode ? 'Light Mode' : 'Dark Mode'}</Button>
<Button onClick={toggleDarkMode} text={isDarkMode ? 'Light Mode' : 'Dark Mode'} />
<ConnectButton />
</section>
<div>{children}</div>
Expand Down
1 change: 1 addition & 0 deletions apps/wallet-dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"node": ">= v18.17.0"
},
"dependencies": {
"@iota/apps-ui-kit": "workspace:*",
"@iota/core": "workspace:*",
"@iota/dapp-kit": "workspace:*",
"@iota/iota-sdk": "workspace:*",
Expand Down
18 changes: 7 additions & 11 deletions apps/wallet-dashboard/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,20 @@
// SPDX-License-Identifier: Apache-2.0

import type { Config } from 'tailwindcss';
// Note: exception for the tailwind preset import
import uiKitResponsivePreset from '../../apps/ui-kit/src/lib/tailwind/responsive.preset';

const config: Config = {
export default {
presets: [uiKitResponsivePreset],
content: [
'./app/**/*.{js,ts,jsx,tsx,mdx}',
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
'./components/**/*.{js,ts,jsx,tsx,mdx}',
'./../ui-kit/src/lib/**/*.{js,jsx,ts,tsx}',
],
darkMode: 'class',
theme: {
extend: {
backgroundImage: {
'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
'gradient-conic':
'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))',
},
},
extend: {},
plugins: [],
},
};

export default config;
} satisfies Partial<Config>;
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 19f63b3

Please sign in to comment.