typedef for context data

This commit is contained in:
August Skare
2018-11-20 15:28:18 +01:00
parent f360b2edd6
commit 6919409c2b
5 changed files with 20 additions and 5 deletions

View File

@@ -1,6 +1,8 @@
import Icon from 'ts/icons/logos/compiler.svg';
export const context = {
import { ContextInterface } from './index';
export const context: ContextInterface = {
title: 'sol-compiler',
name: 'compiler',
subtitle: 'Solidity compilation that just works',

View File

@@ -1,6 +1,8 @@
import Icon from 'ts/icons/logos/cov.svg';
export const context = {
import { ContextInterface } from './index';
export const context: ContextInterface = {
title: 'sol-cov',
name: 'cov',
subtitle: 'Solidity code coverage',

View File

@@ -6,7 +6,14 @@ interface ContextInterface {
subtitle?: string;
tagline?: string;
icon?: React.ReactNode;
colors?: any;
colors?: {
main: string;
secondary: string;
secondary_alt: string;
type: string;
type_alt: string;
dark: string;
};
}
const ThemeContext = createContext({});

View File

@@ -1,6 +1,8 @@
import Icon from 'ts/icons/logos/profiler.svg';
export const context = {
import { ContextInterface } from './index';
export const context: ContextInterface = {
title: 'sol-profiler',
name: 'profiler',
subtitle: 'Gas profiling for Solidity',

View File

@@ -1,6 +1,8 @@
import Icon from 'ts/icons/logos/trace.svg';
export const context = {
import { ContextInterface } from './index';
export const context: ContextInterface = {
title: 'sol-trace',
name: 'trace',
subtitle: 'Human-readable stack traces',