Move theme helpers and some stylesheets to proper locations

This commit is contained in:
Alejandro Celaya
2023-08-05 11:14:03 +02:00
parent 93048e3327
commit d9939f5c3a
48 changed files with 64 additions and 54 deletions

View File

@@ -1,9 +1,9 @@
import { isDarkThemeEnabled, PRIMARY_DARK_COLOR, PRIMARY_LIGHT_COLOR } from '@shlinkio/shlink-frontend-kit';
import type { Chart, ChartData, ChartDataset, ChartOptions } from 'chart.js';
import { keys, values } from 'ramda';
import type { FC } from 'react';
import { memo, useState } from 'react';
import { Doughnut } from 'react-chartjs-2';
import { isDarkThemeEnabled, PRIMARY_DARK_COLOR, PRIMARY_LIGHT_COLOR } from '../../../../src/utils/theme';
import { renderPieChartLabel } from '../../utils/helpers/charts';
import type { Stats } from '../types';
import { DoughnutChartLegend } from './DoughnutChartLegend';

View File

@@ -1,4 +1,4 @@
@import '../../../../src/utils/base';
@import '@shlinkio/shlink-frontend-kit/base';
.doughnut-chart-legend {
list-style-type: none;

View File

@@ -1,9 +1,9 @@
import { HIGHLIGHTED_COLOR, HIGHLIGHTED_COLOR_ALPHA, MAIN_COLOR, MAIN_COLOR_ALPHA } from '@shlinkio/shlink-frontend-kit';
import type { ChartData, ChartDataset, ChartOptions, InteractionItem } from 'chart.js';
import { keys, values } from 'ramda';
import type { FC, MutableRefObject } from 'react';
import { useRef } from 'react';
import { Bar, getElementAtEvent } from 'react-chartjs-2';
import { HIGHLIGHTED_COLOR, HIGHLIGHTED_COLOR_ALPHA, MAIN_COLOR, MAIN_COLOR_ALPHA } from '../../../../src/utils/theme';
import { pointerOnHover, renderChartLabel } from '../../utils/helpers/charts';
import { prettify } from '../../utils/helpers/numbers';
import type { Stats } from '../types';

View File

@@ -1,4 +1,4 @@
@import '../../../../src/utils/base';
@import '@shlinkio/shlink-frontend-kit/base';
.line-chart-card__body canvas {
height: 300px !important;

View File

@@ -1,4 +1,4 @@
import { ToggleSwitch, useToggle } from '@shlinkio/shlink-frontend-kit';
import { HIGHLIGHTED_COLOR, MAIN_COLOR, ToggleSwitch, useToggle } from '@shlinkio/shlink-frontend-kit';
import type { ChartData, ChartDataset, ChartOptions, InteractionItem } from 'chart.js';
import {
add,
@@ -24,7 +24,6 @@ import {
DropdownToggle,
UncontrolledDropdown,
} from 'reactstrap';
import { HIGHLIGHTED_COLOR, MAIN_COLOR } from '../../../../src/utils/theme';
import { formatInternational } from '../../utils/dates/helpers/date';
import { rangeOf } from '../../utils/helpers';
import { pointerOnHover, renderChartLabel } from '../../utils/helpers/charts';