add basic tailwind setup
This commit is contained in:
parent
abe2ecaafc
commit
032f2711c3
10
apps/explorer/postcss.config.js
Normal file
10
apps/explorer/postcss.config.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
const { join } = require('path');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
plugins: {
|
||||||
|
tailwindcss: {
|
||||||
|
config: join(__dirname, 'tailwind.config.js'),
|
||||||
|
},
|
||||||
|
autoprefixer: {},
|
||||||
|
},
|
||||||
|
};
|
@ -16,7 +16,7 @@
|
|||||||
"polyfills": "apps/explorer/src/polyfills.ts",
|
"polyfills": "apps/explorer/src/polyfills.ts",
|
||||||
"tsConfig": "apps/explorer/tsconfig.app.json",
|
"tsConfig": "apps/explorer/tsconfig.app.json",
|
||||||
"assets": ["apps/explorer/src/favicon.ico", "apps/explorer/src/assets"],
|
"assets": ["apps/explorer/src/favicon.ico", "apps/explorer/src/assets"],
|
||||||
"styles": ["apps/explorer/src/styles.scss"],
|
"styles": ["apps/explorer/src/styles.css"],
|
||||||
"scripts": [],
|
"scripts": [],
|
||||||
"webpackConfig": "@nrwl/react/plugins/webpack"
|
"webpackConfig": "@nrwl/react/plugins/webpack"
|
||||||
},
|
},
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import "./splash-loader.scss";
|
// import "./splash-loader.scss";
|
||||||
|
|
||||||
import React from "react";
|
import React from 'react';
|
||||||
|
|
||||||
export const SplashLoader = ({ text = "Loading" }: { text?: string }) => {
|
export const SplashLoader = ({ text = 'Loading' }: { text?: string }) => {
|
||||||
const [, forceRender] = React.useState(false);
|
const [, forceRender] = React.useState(false);
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
const interval = setInterval(() => {
|
const interval = setInterval(() => {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import "./splash-screen.scss";
|
// import "./splash-screen.scss";
|
||||||
|
|
||||||
import React from "react";
|
import React from 'react';
|
||||||
|
|
||||||
export const SplashScreen = ({ children }: { children: React.ReactNode }) => {
|
export const SplashScreen = ({ children }: { children: React.ReactNode }) => {
|
||||||
return <div className="splash-screen">{children}</div>;
|
return <div className="splash-screen">{children}</div>;
|
||||||
|
@ -149,7 +149,7 @@ const Markets = () => {
|
|||||||
|
|
||||||
if (!data || !data.markets) return null;
|
if (!data || !data.markets) return null;
|
||||||
return (
|
return (
|
||||||
<section>
|
<section className="px-8 py-12">
|
||||||
<h1>Markets</h1>
|
<h1>Markets</h1>
|
||||||
{data.markets.map((m) => (
|
{data.markets.map((m) => (
|
||||||
<React.Fragment key={m.id}>
|
<React.Fragment key={m.id}>
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
|
import { TxContent, TxDetails } from '../../../components/txs';
|
||||||
import { DATA_SOURCES } from '../../../config';
|
import { DATA_SOURCES } from '../../../config';
|
||||||
import useFetch from '../../../hooks/use-fetch';
|
import useFetch from '../../../hooks/use-fetch';
|
||||||
import { ChainExplorerTxResponse } from '../../types/chain-explorer-response';
|
import { ChainExplorerTxResponse } from '../../types/chain-explorer-response';
|
||||||
import { TendermintTransactionResponse } from '../tendermint-transaction-response.d';
|
import { TendermintTransactionResponse } from '../tendermint-transaction-response.d';
|
||||||
import { TxDetails, TxContent } from '../../../components/txs';
|
|
||||||
|
|
||||||
const Tx = () => {
|
const Tx = () => {
|
||||||
const { txHash } = useParams<{ txHash: string }>();
|
const { txHash } = useParams<{ txHash: string }>();
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { StrictMode } from 'react';
|
import { StrictMode } from 'react';
|
||||||
import * as ReactDOM from 'react-dom';
|
import * as ReactDOM from 'react-dom';
|
||||||
import { BrowserRouter } from 'react-router-dom';
|
import { BrowserRouter } from 'react-router-dom';
|
||||||
|
import './styles.css';
|
||||||
|
|
||||||
import App from './app/app';
|
import App from './app/app';
|
||||||
|
|
||||||
|
4
apps/explorer/src/styles.css
Normal file
4
apps/explorer/src/styles.css
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
/* You can add global styles to this file, and also import other style files */
|
||||||
|
@tailwind base;
|
||||||
|
@tailwind components;
|
||||||
|
@tailwind utilities;
|
@ -1 +0,0 @@
|
|||||||
/* You can add global styles to this file, and also import other style files */
|
|
13
apps/explorer/tailwind.config.js
Normal file
13
apps/explorer/tailwind.config.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
const { join } = require('path');
|
||||||
|
const { createGlobPatternsForDependencies } = require('@nrwl/next/tailwind');
|
||||||
|
const theme = require('../../libs/tailwindcss-config/src/theme');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
content: [
|
||||||
|
join(__dirname, 'src/**/*.{js,ts,jsx,tsx}'),
|
||||||
|
...createGlobPatternsForDependencies(__dirname),
|
||||||
|
],
|
||||||
|
darkMode: 'class',
|
||||||
|
theme,
|
||||||
|
plugins: [],
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user