Skip to content

Commit

Permalink
Fix UI, colors, custom select, dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
akmatoff committed Nov 5, 2024
1 parent c13f6d6 commit 0f511f6
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 37 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Base Image
FROM node:20.18.0-slim AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"

# Enable Corepack and Prepare PNPM
RUN corepack enable
Expand Down
16 changes: 0 additions & 16 deletions src/components/shared/CustomSelect/CustomSelect.module.scss

This file was deleted.

13 changes: 5 additions & 8 deletions src/components/shared/CustomSelect/CustomSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,14 @@ function CustomSelect({
errorMessage={errorMessage}
selectedKeys={[activeValue.value || ""]}
isDisabled={isViewOnly || isTeacher}
items={options}
classNames={{ selectorIcon: "self-end" }}
>
{options.map((option) => (
<SelectItem
key={option.value}
value={option.value}
className="mx-0"
classNames={{ wrapper: ["bg-bgPrimary"] }}
>
{(option) => (
<SelectItem key={option.value} value={option.value}>
{option.label}
</SelectItem>
))}
)}
</Select>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/shared/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function Header() {

return (
<div className="w-full h-16">
<div className="w-full h-full flex justify-between items-center bg-bgSecondary p-8">
<div className="w-full h-full flex justify-between items-center bg-default p-8">
<div>
<Link to={ROUTES.OFFICE}>
<Typography variant="h2" color="var(--text-color)">
Expand Down
2 changes: 1 addition & 1 deletion src/components/shared/NavElement/NavElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function NavElement({ title, href, onCreateClick }: Props) {
<div
className={cn(
"flex justify-between items-center w-full h-[42px] rounded-2xl border border-background hover:border-secondary duration-300 py-2 px-4 cursor-pointer",
location.pathname === `/office${href}` ? "bg-primary" : ""
location.pathname === `/office${href}` ? "bg-default" : ""
)}
onClick={() => navigate(`/office${href}`)}
>
Expand Down
1 change: 0 additions & 1 deletion src/components/shared/Resource/Resource.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
width: 100%;
height: 56px;
padding: 16px;
background: var(--bg-secondary-color);
border-radius: var(--secondary-radius);
display: flex;
justify-content: space-between;
Expand Down
2 changes: 1 addition & 1 deletion src/components/shared/Resource/Resource.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function Resource({

return (
<div className={styles.wrapper}>
<div className={styles.header}>
<div>
<Typography>{title}</Typography>

{!isTeacher && (
Expand Down
2 changes: 1 addition & 1 deletion src/components/shared/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function Sidebar() {
return (
<div className="flex-[0_0_20%] mt-6 px-4">
<div>
<div className="bg-bgSecondary p-4 rounded-xl">
<div className="bg-default p-4 rounded-xl">
{!isLoading && (
<Typography weight="600">
{isTeacher ? "Преподаватель" : "Администрация"}
Expand Down
1 change: 0 additions & 1 deletion src/components/shared/TextEditor/TextEditor.module.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.container {
min-height: 264px;
margin: 8px 0;
background: var(--bg-primary-color);
border-radius: var(--secondary-radius);
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/shared/TextEditor/TextEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Image from "@tiptap/extension-image";
import Heading from "@tiptap/extension-heading";
import { common, createLowlight } from "lowlight";
import { FC, forwardRef, useEffect, useState } from "react";

import cn from "classnames";
import Typography from "../Typography/Typography";
import EditorMenu from "./EditorMenu";

Expand Down Expand Up @@ -108,7 +108,7 @@ const TextEditor: FC<Props> = forwardRef<any, Props>(function InputComponent(
return (
<div>
{label && <Typography variant="body3">{label}</Typography>}
<div className={styles.container}>
<div className={cn(styles.container, "bg-default")}>
<EditorMenu
editor={editor}
onYoutubeClick={() => setShowYoutubeModal(true)}
Expand Down
6 changes: 1 addition & 5 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ export default {
theme: {
extend: {
colors: {
"text-color": "var(--text-color)",
"text-color-dark": "var(--text-color-dark)",
bgPrimary: "var(--bg-primary-color)",
bgSecondary: "var(--bg-secondary-color)",
primary: {
Expand All @@ -22,8 +20,6 @@ export default {
DEFAULT: "var(--secondary-color)",
foreground: "var(--text-color)"
},
danger: "var(--danger-color)",
focus: "var(--primary-color)"
}
},
},
Expand Down Expand Up @@ -81,7 +77,7 @@ export default {
200: '#803c00',
100: '#4e2300',
50: '#1f0a00',
}
},
}

},
Expand Down

0 comments on commit 0f511f6

Please sign in to comment.