Skip to content

Commit cbc6c3a

Browse files
committed
Merge branch 'feat/centralize-constants' of https://github.com/ritoban23/olake-ui into feat/centralize-constants
2 parents c1002b8 + cb0d7e6 commit cbc6c3a

36 files changed

Lines changed: 223 additions & 182 deletions

ui/src/modules/auth/pages/Login.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useState } from "react"
22
import { useNavigate } from "react-router-dom"
33
import { Form, Input, Button, Card, message } from "antd"
4-
import { User, LockKey } from "@phosphor-icons/react"
4+
import { UserIcon, LockKeyIcon } from "@phosphor-icons/react"
55

66
import { useAppStore } from "../../../store"
77
import { LoginArgs } from "../../../types"
@@ -57,7 +57,7 @@ const Login: React.FC = () => {
5757
>
5858
<Input
5959
prefix={
60-
<User
60+
<UserIcon
6161
className="site-form-item-icon text-gray-500"
6262
weight="bold"
6363
size={18}
@@ -77,7 +77,7 @@ const Login: React.FC = () => {
7777
>
7878
<Input.Password
7979
prefix={
80-
<LockKey
80+
<LockKeyIcon
8181
className="site-form-item-icon text-gray-500"
8282
weight="bold"
8383
size={18}

ui/src/modules/common/Modals/ClearDataModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useNavigate } from "react-router-dom"
2-
import { Warning } from "@phosphor-icons/react"
2+
import { WarningIcon } from "@phosphor-icons/react"
33
import { Button, message, Modal } from "antd"
44
import { useAppStore } from "../../../store"
55

@@ -15,7 +15,7 @@ const ClearDataModal = () => {
1515
centered
1616
>
1717
<div className="flex w-full flex-col items-center justify-center gap-8">
18-
<Warning
18+
<WarningIcon
1919
className="size-16 text-danger"
2020
weight="fill"
2121
/>

ui/src/modules/common/Modals/ClearDestinationAndSyncModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useNavigate } from "react-router-dom"
2-
import { Warning } from "@phosphor-icons/react"
2+
import { WarningIcon } from "@phosphor-icons/react"
33
import { Button, message, Modal } from "antd"
44
import { useAppStore } from "../../../store"
55

@@ -18,7 +18,7 @@ const ClearDestinationAndSyncModal = () => {
1818
centered
1919
>
2020
<div className="flex w-full flex-col items-center justify-center gap-8">
21-
<Warning
21+
<WarningIcon
2222
className="size-16 text-primary"
2323
weight="fill"
2424
/>

ui/src/modules/common/Modals/DeleteJobModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useNavigate } from "react-router-dom"
22
import { Button, message, Modal } from "antd"
3-
import { Warning } from "@phosphor-icons/react"
3+
import { WarningIcon } from "@phosphor-icons/react"
44

55
import { useAppStore } from "../../../store"
66

@@ -25,7 +25,7 @@ const DeleteJobModal = ({
2525
centered
2626
>
2727
<div className="flex w-full flex-col items-center justify-center gap-8">
28-
<Warning
28+
<WarningIcon
2929
className="size-16 text-danger"
3030
weight="fill"
3131
/>

ui/src/modules/common/Modals/DeleteModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { formatDistanceToNow } from "date-fns"
22
import { Button, message, Modal, Table } from "antd"
3-
import { Warning } from "@phosphor-icons/react"
3+
import { WarningIcon } from "@phosphor-icons/react"
44

55
import { useAppStore } from "../../../store"
66
import { Entity } from "../../../types"
@@ -138,7 +138,7 @@ const DeleteModal = ({ fromSource }: DeleteModalProps) => {
138138
width={600}
139139
>
140140
<div className="flex flex-col items-center justify-center gap-7 py-8">
141-
<Warning
141+
<WarningIcon
142142
weight="fill"
143143
className="h-[55px] w-[63px] text-danger"
144144
/>

ui/src/modules/common/Modals/DestinationDatabaseModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
LABELS,
99
NAMESPACE_PLACEHOLDER,
1010
} from "../../../utils/constants"
11-
import { DotOutline } from "@phosphor-icons/react"
11+
import { DotOutlineIcon } from "@phosphor-icons/react"
1212
import { DestinationDatabaseModalProps } from "../../../types"
1313

1414
type FormatType = (typeof FORMAT_OPTIONS)[keyof typeof FORMAT_OPTIONS]
@@ -177,7 +177,7 @@ const DestinationDatabaseModal = ({
177177
key={index}
178178
className="flex items-center text-sm"
179179
>
180-
<DotOutline
180+
<DotOutlineIcon
181181
size={24}
182182
weight="fill"
183183
/>

ui/src/modules/common/Modals/EntityCancelModal.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import React from "react"
22
import { useNavigate } from "react-router-dom"
33
import { Button, Modal } from "antd"
4-
import { GitCommit, LinktreeLogo, Path } from "@phosphor-icons/react"
4+
import {
5+
GitCommitIcon,
6+
LinktreeLogoIcon,
7+
PathIcon,
8+
} from "@phosphor-icons/react"
59

610
import { useAppStore } from "../../../store"
711
import { JOB_CREATION_STEPS } from "../../../utils/constants"
@@ -28,11 +32,11 @@ const EntityCancelModal: React.FC<EntityCancelModalProps> = ({
2832
<div className="flex flex-col items-center justify-center gap-6 py-4">
2933
<div className="rounded-xl bg-neutral-light p-2">
3034
{type === JOB_CREATION_STEPS.SOURCE ? (
31-
<LinktreeLogo className="z-10 size-6 text-text-link" />
35+
<LinktreeLogoIcon className="z-10 size-6 text-text-link" />
3236
) : type === JOB_CREATION_STEPS.DESTINATION ? (
33-
<Path className="z-10 size-6 text-text-link" />
37+
<PathIcon className="z-10 size-6 text-text-link" />
3438
) : (
35-
<GitCommit className="z-10 size-6 text-text-link" />
39+
<GitCommitIcon className="z-10 size-6 text-text-link" />
3640
)}
3741
</div>
3842
<div className="mb-4 text-center text-xl font-medium">

ui/src/modules/common/Modals/EntityEditModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useNavigate } from "react-router-dom"
22
import { formatDistanceToNow } from "date-fns"
33
import { Button, Modal, Table, message } from "antd"
4-
import { InfoIcon, Warning } from "@phosphor-icons/react"
4+
import { InfoIcon, WarningIcon } from "@phosphor-icons/react"
55

66
import { useAppStore } from "../../../store"
77
import { sourceService } from "../../../api"
@@ -165,7 +165,7 @@ const EntityEditModal = ({ entityType }: EntityEditModalProps) => {
165165
<Modal
166166
title={
167167
<div className="flex justify-center">
168-
<Warning
168+
<WarningIcon
169169
weight="fill"
170170
className="size-12 text-primary"
171171
/>

ui/src/modules/common/Modals/EntitySavedModal.tsx

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import { useNavigate } from "react-router-dom"
2-
import { Check, GitCommit, Path, LinktreeLogo } from "@phosphor-icons/react"
2+
import {
3+
CheckIcon,
4+
GitCommitIcon,
5+
PathIcon,
6+
LinktreeLogoIcon,
7+
} from "@phosphor-icons/react"
38
import { Button, Modal } from "antd"
49
import { useAppStore } from "../../../store"
510
import { EntitySavedModalProps } from "../../../types"
@@ -23,11 +28,11 @@ const EntitySavedModal: React.FC<EntitySavedModalProps> = ({
2328
<div className="flex flex-col items-center justify-center gap-4 py-4">
2429
<div className="rounded-xl bg-neutral-light p-2">
2530
{type === "source" ? (
26-
<LinktreeLogo className="z-10 size-5 text-text-link" />
31+
<LinktreeLogoIcon className="z-10 size-5 text-text-link" />
2732
) : type === JOB_CREATION_STEPS.STREAMS ? (
28-
<GitCommit className="z-10 size-5 text-text-link" />
33+
<GitCommitIcon className="z-10 size-5 text-text-link" />
2934
) : (
30-
<Path className="z-10 size-5 text-text-link" />
35+
<PathIcon className="z-10 size-5 text-text-link" />
3136
)}
3237
</div>
3338
<div className="mb-4 text-center text-xl font-medium">
@@ -40,11 +45,11 @@ const EntitySavedModal: React.FC<EntitySavedModalProps> = ({
4045
<div className="mb-4 flex w-full items-center justify-between gap-3 rounded-xl border border-[#D9D9D9] px-4 py-2">
4146
<div className="flex items-center gap-1">
4247
{type === "source" ? (
43-
<LinktreeLogo className="size-5" />
48+
<LinktreeLogoIcon className="size-5" />
4449
) : type === JOB_CREATION_STEPS.STREAMS ? (
45-
<GitCommit className="size-5" />
50+
<GitCommitIcon className="size-5" />
4651
) : (
47-
<Path className="size-5" />
52+
<PathIcon className="size-5" />
4853
)}
4954
<span>
5055
{entityName ||
@@ -56,7 +61,7 @@ const EntitySavedModal: React.FC<EntitySavedModalProps> = ({
5661
</span>
5762
</div>
5863
<div className="flex gap-1 rounded-xl bg-[#f6ffed] px-2 py-1">
59-
<Check className="size-5 text-success" />
64+
<CheckIcon className="size-5 text-success" />
6065
<span className="ml-auto text-success">Success</span>
6166
</div>
6267
</div>

ui/src/modules/common/components/DocumentationPanel.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { useState, useRef, useEffect } from "react"
22
import clsx from "clsx"
33
import { Button, Tooltip } from "antd"
44
import {
5-
CornersOut,
6-
CaretRight,
7-
Info,
5+
CornersOutIcon,
6+
CaretRightIcon,
7+
InfoIcon,
88
ArrowSquareOutIcon,
99
} from "@phosphor-icons/react"
1010

@@ -92,7 +92,7 @@ const DocumentationPanel: React.FC<DocumentationPanelProps> = ({
9292
className="flex items-center bg-blue-600"
9393
onClick={toggleDocPanel}
9494
icon={
95-
<CornersOut
95+
<CornersOutIcon
9696
size={16}
9797
className="mr-2"
9898
/>
@@ -121,7 +121,7 @@ const DocumentationPanel: React.FC<DocumentationPanelProps> = ({
121121
isDocPanelCollapsed ? "rotate-180" : "rotate-0",
122122
)}
123123
>
124-
<CaretRight size={16} />
124+
<CaretRightIcon size={16} />
125125
</div>
126126
</button>
127127
</div>
@@ -174,7 +174,7 @@ const DocumentationPanel: React.FC<DocumentationPanelProps> = ({
174174
<div className="flex h-full w-full items-start justify-center">
175175
<div className="absolute right-3 top-10 z-10 flex flex-col gap-2">
176176
<div className="rounded-xl border border-gray-200 bg-neutral-light p-2">
177-
<Info
177+
<InfoIcon
178178
size={25}
179179
className="cursor-pointer text-primary transition-all duration-300 ease-in-out hover:text-primary/80"
180180
onClick={toggleDocPanel}

0 commit comments

Comments
 (0)