Skip to content

Commit

Permalink
Fix: Bug with Tailwind gray color extension (#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmrossy authored Dec 6, 2024
1 parent b2c1d08 commit 39cbd47
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/consts/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ export const MAIN_FONT = SpaceGrotesk({
export const APP_NAME = 'Hyperlane Warp UI Template';
export const APP_DESCRIPTION = 'A DApp for Hyperlane Warp Route transfers';
export const APP_URL = 'hyperlane-warp-template.vercel.app';
export const BRAND_COLOR = Color.primary;
export const BACKGROUND_COLOR = Color.primary;
export const BRAND_COLOR = Color.primary['500'];
export const BACKGROUND_COLOR = Color.primary['500'];
export const BACKGROUND_IMAGE = 'url(/backgrounds/main.svg)';
2 changes: 1 addition & 1 deletion src/features/transfer/TransfersDetailsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ function WideChevron() {
width="16"
height="100%"
direction="e"
color={Color.lightGray}
color={Color.gray['300']}
rounded={true}
/>
);
Expand Down
4 changes: 2 additions & 2 deletions src/features/wallet/WalletFloatingButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ export function WalletFloatingButtons() {
title="History"
onClick={() => setIsSideBarOpen(!isSideBarOpen)}
>
<HistoryIcon color={Color.primary} height={20} width={20} />
<HistoryIcon color={Color.primary['500']} height={20} width={20} />
</IconButton>
<Link
href={links.warpDocs}
target="_blank"
className={`p-0.5 ${styles.roundedCircle} ${styles.link}`}
>
<DocsIcon color={Color.primary} height={19} width={19} className="p-px" />
<DocsIcon color={Color.primary['500']} height={19} width={19} className="p-px" />
</Link>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/features/wallet/context/EvmWalletContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function EvmWalletContext({ children }: PropsWithChildren<unknown>) {
<WagmiProvider config={wagmiConfig}>
<RainbowKitProvider
theme={lightTheme({
accentColor: Color.primary,
accentColor: Color.primary['500'],
borderRadius: 'small',
fontStack: 'system',
})}
Expand Down
9 changes: 4 additions & 5 deletions src/styles/Color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ const themeColors = theme.extend.colors as unknown as Record<string, string>;
export const Color = {
black: themeColors.black,
white: themeColors.white,
gray: themeColors.gray[500],
lightGray: themeColors.gray[200],
primary: themeColors.primary[500],
accent: themeColors.accent[500],
red: themeColors.red[500],
gray: themeColors.gray,
primary: themeColors.primary,
accent: themeColors.accent,
red: themeColors.red,
} as const;
3 changes: 2 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @type {import('tailwindcss').Config} */

const defaultTheme = require('tailwindcss/defaultTheme');
const defaultColors = require('tailwindcss/colors');

module.exports = {
content: ['./src/**/*.{js,ts,jsx,tsx}'],
Expand All @@ -19,7 +20,7 @@ module.exports = {
colors: {
black: '#010101',
white: '#ffffff',
gray: { ...defaultTheme.colors.gray, 150: '#EBEDF0', 250: '#404040', 350: '#6B6B6B' },
gray: { ...defaultColors.gray, '150': '#EBEDF0', '250': '#404040', '350': '#6B6B6B' },
primary: {
50: '#E6EDF9',
100: '#CDDCF4',
Expand Down

0 comments on commit 39cbd47

Please sign in to comment.