Updated code style
This commit is contained in:
parent
08dfe42b68
commit
902eb989dc
|
@ -41,7 +41,11 @@
|
|||
"files.eol": "\n",
|
||||
"[markdown]": {
|
||||
"editor.wordWrap": "on",
|
||||
"editor.quickSuggestions": false,
|
||||
"editor.quickSuggestions": {
|
||||
"comments": "off",
|
||||
"strings": "off",
|
||||
"other": "off"
|
||||
},
|
||||
"editor.tabSize": 4
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
.box {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
width: calc(100rem / 16);
|
||||
height: calc(100rem / 16);
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
flex-wrap: wrap;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
margin: 10px;
|
||||
width: 150px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
margin: calc(10rem / 16);
|
||||
width: calc(150rem / 16);
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
import React from "react";
|
||||
import { Colors } from "utils/Colors";
|
||||
import { Color } from "utils/Color";
|
||||
|
||||
import styles from "./ColorPalette.module.css";
|
||||
|
||||
|
@ -8,7 +8,7 @@ export function ColorPalette() {
|
|||
<>
|
||||
<h2>Color Palette</h2>
|
||||
<div className={styles.wrapper}>
|
||||
{Object.entries(Colors).map(([colorName, colorCSSName]) => (
|
||||
{Object.entries(Color).map(([colorName, colorCSSName]) => (
|
||||
<div key={colorName} className={styles.item}>
|
||||
<div
|
||||
className={styles.box}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export const colorNames = [
|
||||
const colorNames = [
|
||||
"primaryBackground",
|
||||
"secondaryBackground",
|
||||
"tertiaryBackground",
|
||||
|
@ -19,7 +19,7 @@ export const colorNames = [
|
|||
// This type is needed for smart autocomplete
|
||||
type ColorName = typeof colorNames[number];
|
||||
|
||||
export const Colors: { [key in ColorName]: string } = {
|
||||
export const Color: { [key in ColorName]: string } = {
|
||||
primaryBackground: "var(--primary-background)",
|
||||
secondaryBackground: "var(--secondary-background)",
|
||||
tertiaryBackground: "var(--tertiary-background)",
|
Loading…
Reference in New Issue