mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-25 09:26:17 -05:00
Moving theme constants into Theme.js.
This commit is contained in:
parent
7fa89dca58
commit
1033b0c38f
4 changed files with 9 additions and 15 deletions
|
|
@ -3,8 +3,8 @@ import {Card, Container, IconGroup, Image, Input, Modal, Pagination, Responsive,
|
|||
import {Link, NavLink} from "react-router-dom";
|
||||
import Message from "semantic-ui-react/dist/commonjs/collections/Message";
|
||||
import {useDownloaders, useHotspot, useThrottle} from "../hooks/customHooks";
|
||||
import {darkTheme, StatusContext, ThemeContext} from "../contexts/contexts";
|
||||
import {Button, CardIcon, Form, Header, Icon, Menu, Popup, Statistic} from "./Theme";
|
||||
import {StatusContext, ThemeContext} from "../contexts/contexts";
|
||||
import {Button, CardIcon, darkTheme, Form, Header, Icon, Menu, Popup, Statistic} from "./Theme";
|
||||
|
||||
export const API_URI = `http://${window.location.host}/api`;
|
||||
export const VIDEOS_API = `${API_URI}/videos`;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, {useContext, useEffect, useState} from 'react';
|
||||
import {darkTheme, lightTheme, ThemeContext} from "../contexts/contexts";
|
||||
import {ThemeContext} from "../contexts/contexts";
|
||||
import {
|
||||
Accordion as ACCORDION,
|
||||
Button as BUTTON,
|
||||
|
|
@ -23,6 +23,9 @@ import {
|
|||
TextArea as TEXTAREA
|
||||
} from "semantic-ui-react";
|
||||
|
||||
export const darkTheme = 'dark';
|
||||
export const lightTheme = 'light';
|
||||
|
||||
export function ThemeWrapper({children, ...props}) {
|
||||
if (Object.keys(props).length > 0) {
|
||||
console.log(props);
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import Grid from "semantic-ui-react/dist/commonjs/collections/Grid";
|
|||
import Container from "semantic-ui-react/dist/commonjs/elements/Container";
|
||||
import {VideoPlaceholder} from "./Placeholder";
|
||||
import {useChannel} from "../hooks/customHooks";
|
||||
import {darkTheme, ThemeContext} from "../contexts/contexts";
|
||||
import {Button, Header, Icon, Segment, Tab, TabPane} from "./Theme";
|
||||
import {ThemeContext} from "../contexts/contexts";
|
||||
import {Button, darkTheme, Header, Icon, Segment, Tab, TabPane} from "./Theme";
|
||||
|
||||
const MEDIA_PATH = '/media';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,5 @@
|
|||
import React from "react";
|
||||
|
||||
export const darkTheme = 'dark';
|
||||
export const lightTheme = 'light';
|
||||
|
||||
export const SettingsContext = React.createContext({});
|
||||
export const ThemeContext = React.createContext({
|
||||
theme: null,
|
||||
i: {},
|
||||
setTheme: () => {
|
||||
},
|
||||
});
|
||||
export const ThemeContext = React.createContext({theme: null, i: {}});
|
||||
|
||||
export const StatusContext = React.createContext({});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue