Skip to content

Commit

Permalink
Minor DX improvements (#138)
Browse files Browse the repository at this point in the history
* Using semicolon consistently in TS interfaces

* Adding index.html to Tailwind's "content" option

* Supporting default Tailwind colors as well as custom ones
  • Loading branch information
liarco authored Mar 17, 2022
1 parent 3369445 commit dd21ef5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
6 changes: 3 additions & 3 deletions minting-dapp/src/scripts/react/Dapp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ interface Props {

interface State {
userAddress: string|null;
network: ethers.providers.Network|null,
networkConfig: NetworkConfigInterface,
network: ethers.providers.Network|null;
networkConfig: NetworkConfigInterface;
totalSupply: number;
maxSupply: number;
maxMintAmountPerTx: number;
Expand All @@ -27,7 +27,7 @@ interface State {
isUserInWhitelist: boolean;
merkleProofManualAddress: string;
merkleProofManualAddressFeedbackMessage: string|JSX.Element|null;
errorMessage: string|JSX.Element|null,
errorMessage: string|JSX.Element|null;
}

const defaultState: State = {
Expand Down
18 changes: 9 additions & 9 deletions minting-dapp/src/scripts/react/MintWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import { utils, BigNumber } from 'ethers';
import React from 'react';

interface Props {
maxSupply: number,
totalSupply: number,
tokenPrice: BigNumber,
maxMintAmountPerTx: number,
isPaused: boolean,
isWhitelistMintEnabled: boolean,
isUserInWhitelist: boolean,
mintTokens(mintAmount: number): Promise<void>,
whitelistMintTokens(mintAmount: number): Promise<void>,
maxSupply: number;
totalSupply: number;
tokenPrice: BigNumber;
maxMintAmountPerTx: number;
isPaused: boolean;
isWhitelistMintEnabled: boolean;
isUserInWhitelist: boolean;
mintTokens(mintAmount: number): Promise<void>;
whitelistMintTokens(mintAmount: number): Promise<void>;
}

interface State {
Expand Down
24 changes: 13 additions & 11 deletions minting-dapp/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
const colors = require('tailwindcss/colors');

// Setting some custom names
colors.popupsbg = colors.white;
colors.neutral = colors.slate;
colors.primary = colors.indigo;
colors.primarytxt = colors.white;
colors.warning = colors.yellow;
colors.warningtxt = colors.black;
colors.error = colors.red;
colors.errortxt = colors.white;

module.exports = {
mode: 'jit',
content: [
'./src/**/*.tsx',
'./public/index.html',
],
theme: {
extend: {},
colors: {
popupsbg: colors.white,
neutral: colors.slate,
primary: colors.indigo,
primarytxt: colors.white,
warning: colors.yellow,
warningtxt: colors.black,
error: colors.red,
errortxt: colors.white,
}
colors,
},
variants: {},
plugins: [],
}
};

0 comments on commit dd21ef5

Please sign in to comment.