Skip to content

Commit

Permalink
fix: removed extra commons.css generation
Browse files Browse the repository at this point in the history
  • Loading branch information
PKulkoRaccoonGang committed Sep 8, 2023
1 parent 9ba0ed5 commit 845c058
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
5 changes: 0 additions & 5 deletions www/src/components/PageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ import { SettingsContext } from '../context/SettingsContext';
import LeaveFeedback from './LeaveFeedback';
import AutoToc from './AutoToc';

if (process.env.NODE_ENV === 'development') {
/* eslint-disable-next-line global-require */
require('~paragon-style/scss/core/core.scss');
}

export interface ILayout {
children: React.ReactNode,
showMinimizedTitle: boolean,
Expand Down
11 changes: 5 additions & 6 deletions www/src/pages/foundations/colors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ export interface ISwatch {
isUnused?: boolean,
}

const styles = getComputedStyle(document.body);
const styles = typeof window !== `undefined` ? getComputedStyle(document.body) : null;

Check failure on line 58 in www/src/pages/foundations/colors.tsx

View workflow job for this annotation

GitHub Actions / tests

Strings must use singlequote

function Swatch({ name, colorClassName, isUnused }: ISwatch) {
const computedValue = styles.getPropertyValue(name);
const computedValue = styles?.getPropertyValue(name);

return (
<div className="d-flex align-items-center mb-2">
Expand Down Expand Up @@ -128,16 +128,15 @@ export default function ColorsPage({ data }: IColorsPage) {
{colors
.slice(0, 3)
.map(({ themeName, unusedLevels }) => renderColorRamp(themeName, unusedLevels))}
{colors
.slice(3)
.map(({ themeName, unusedLevels }) => renderColorRamp(themeName, unusedLevels))}
<div>
<p className="h5">accents</p>

<Swatch name="--pgn-color-accent-a" colorClassName="bg-accent-a" />
<Swatch name="--pgn-color-accent-b" colorClassName="bg-accent-b" />
</div>

{colors
.slice(3)
.map(({ themeName, unusedLevels }) => renderColorRamp(themeName, unusedLevels))}
</div>

<h3>CSS Color Usage</h3>
Expand Down

0 comments on commit 845c058

Please sign in to comment.