Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: add icons
  • Loading branch information
G3root committed Aug 9, 2024
commit 6d48bfa38bbf08192b99e1cf93c4908b916e76f5
1 change: 1 addition & 0 deletions src/components/file/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import EmptyState from "@/components/common/empty-state";
import { OfficeViewer } from "@/components/file/office-viewer";
import { Button } from "@/components/ui/button";
import { Icon } from "@/components/ui/icon";
import { PdfViewer } from "@/components/ui/pdf-viewer";
import { fileType } from "@/lib/mime";
import { RiFileUnknowFill as UnknownFileIcon } from "@remixicon/react";
Expand Down
1 change: 1 addition & 0 deletions src/components/member/member-bulk-import-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import Modal from "@/components/common/modal";
import TeamMemberUploader from "@/components/member/member-uploader";
import { Button } from "@/components/ui/button";
import { Icon } from "@/components/ui/icon";
import { RiGroup2Fill } from "@remixicon/react";
import { useState } from "react";

Expand Down
1 change: 1 addition & 0 deletions src/components/member/member-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { api } from "@/trpc/react";

import { Avatar, AvatarImage } from "@/components/ui/avatar";

import { Icon } from "@/components/ui/icon";
import { getRoleId } from "@/lib/rbac/access-control-utils";
import type { RouterOutputs } from "@/trpc/shared";
import { RiMore2Fill } from "@remixicon/react";
Expand Down
3 changes: 2 additions & 1 deletion src/components/member/member-uploader.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use client";

import { Button } from "@/components/ui/button";
import { Icon } from "@/components/ui/icon";
import { parseInviteMembersCSV } from "@/lib/invite-team-members-csv-parser";
import { api } from "@/trpc/react";
import type { TypeZodInviteMemberArrayMutationSchema } from "@/trpc/routers/member-router/schema";
Expand Down Expand Up @@ -81,7 +82,7 @@ const TeamMemberUploader = ({ setOpen }: TeamMemberUploaderType) => {
className="flex h-24 cursor-pointer flex-col items-center justify-center gap-2 rounded-lg border border-gray-300"
onClick={() => fileInputRef.current?.click()}
>
<RiUploadLine className="h-7 w-7 text-neutral-500" />
<Icon name="upload-line" className="h-7 w-7 text-neutral-500" />
<span className="text-sm text-neutral-500">
{csvFile.length !== 0 ? csvFile[0]?.name : "Click here to import"}
</span>
Expand Down
8 changes: 6 additions & 2 deletions src/components/member/verify-member-form.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"use client";
import { Icon } from "@/components/ui/icon";
import {
type TypeZodAcceptMemberMutationSchema,
ZodAcceptMemberMutationSchema,
Expand Down Expand Up @@ -45,7 +46,7 @@ export function VerifyMemberForm({ memberId, token }: VerifyMemberFormProps) {
},
});

async function onSubmit(values: TypeZodAcceptMemberMutationSchema) {
function onSubmit(values: TypeZodAcceptMemberMutationSchema) {
acceptMember.mutate(values);
}

Expand Down Expand Up @@ -103,7 +104,10 @@ export function VerifyMemberForm({ memberId, token }: VerifyMemberFormProps) {
type="submit"
>
Complete onboarding
<RiArrowRightLine className="ml-2 inline-block h-5 w-5" />
<Icon
name="arrow-right-line"
className="ml-2 inline-block h-5 w-5"
/>
</Button>
</form>
</Form>
Expand Down
9 changes: 7 additions & 2 deletions src/components/modals/equity-pan/equity-plan-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import Tldr from "@/components/common/tldr";
import { popModal, pushModal } from "@/components/modals";
import { Button } from "@/components/ui/button";
import { Icon } from "@/components/ui/icon";
import { Input } from "@/components/ui/input";
import { Textarea } from "@/components/ui/textarea";
import { api } from "@/trpc/react";
Expand Down Expand Up @@ -240,7 +241,11 @@ export const EquityPlanForm = ({
>
<div className="flex justify-between items-center my-1">
<span>
<RiAddFill className="h-4 w-4" aria-hidden />
<Icon
name="add-fill"
className="h-4 w-4"
aria-hidden
/>
</span>

<div>Create new share class</div>
Expand Down Expand Up @@ -271,7 +276,7 @@ export const EquityPlanForm = ({
});
}}
>
<RiAddFill className="mr-2 h-5 w-5" />
<Icon name="add-fill" className="mr-2 h-5 w-5" />
Create a share class
</Button>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
FormLabel,
FormMessage,
} from "@/components/ui/form";
import { Icon } from "@/components/ui/icon";
import { Input } from "@/components/ui/input";
import {
StepperModalContent,
Expand Down Expand Up @@ -156,7 +157,8 @@ export function AddRecipientStep({ companyPublicId }: AddRecipientStepProps) {
size="sm"
className="group h-8 w-8 p-2"
>
<RiDeleteBinLine
<Icon
name="delete-bin-line"
aria-hidden
className="h-8 w-8 text-red-500/70 group-hover:text-red-500"
/>
Expand Down
3 changes: 2 additions & 1 deletion src/components/onboarding/check-email/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use client";

import { Button } from "@/components/ui/button";
import { Icon } from "@/components/ui/icon";
import { api } from "@/trpc/react";
import { RiMailLine } from "@remixicon/react";
import { useSearchParams } from "next/navigation";
Expand Down Expand Up @@ -37,7 +38,7 @@ const CheckEmailComponent = () => {
<div className="flex flex-col gap-y-2 text-center">
<div className="mx-auto mb-6 flex h-16 w-16 items-center justify-center rounded-full bg-teal-100">
<span className="text-teal-500">
<RiMailLine className="h-6 w-auto" />
<Icon name="mail-line" className="h-6 w-auto" />
</span>
</div>
<h1 className="text-2xl font-semibold tracking-tight">
Expand Down
6 changes: 5 additions & 1 deletion src/components/onboarding/company-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
FormLabel,
FormMessage,
} from "@/components/ui/form";
import { Icon } from "@/components/ui/icon";
import { Input } from "@/components/ui/input";
import {
Select,
Expand Down Expand Up @@ -509,7 +510,10 @@ export const CompanyForm = ({ type, data }: CompanyFormProps) => {
{type === "onboarding" || type === "create" ? (
<>
Complete Setup
<RiArrowRightLine className="ml-2 inline-block h-5 w-5" />
<Icon
name="arrow-right-line"
className="ml-2 inline-block h-5 w-5"
/>
</>
) : (
"Save"
Expand Down
3 changes: 2 additions & 1 deletion src/components/onboarding/email-sent/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use client";

import { Button } from "@/components/ui/button";
import { Icon } from "@/components/ui/icon";
import { RiMailLine } from "@remixicon/react";
import Link from "next/link";

Expand All @@ -9,7 +10,7 @@ const EmailSent = () => {
<div className="flex h-screen items-center justify-center bg-gradient-to-br from-indigo-50 via-white to-cyan-100">
<div className="grid w-full max-w-md grid-cols-1 gap-5 rounded-xl border bg-white p-10 shadow">
<div className="flex flex-col gap-y-2 text-center">
<RiMailLine className="mb-1 h-10 w-auto" />
<Icon name="mail-line" className="mb-1 h-10 w-auto" />
<h1 className="text-2xl font-semibold tracking-tight">Email sent!</h1>
</div>
<div className="text-center">
Expand Down
5 changes: 3 additions & 2 deletions src/components/onboarding/signin/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
FormLabel,
FormMessage,
} from "@/components/ui/form";
import { Icon } from "@/components/ui/icon";
import { Input } from "@/components/ui/input";
import { PasswordInput } from "@/components/ui/password-input";
import { api } from "@/trpc/react";
Expand Down Expand Up @@ -119,7 +120,7 @@ const SignInForm = ({ isGoogleAuthEnabled }: LoginFormProps) => {
type="button"
onClick={onSignInWithPasskey}
>
<RiDoorLockLine className="h-5 w-5" />
<Icon name="door-lock-line" className="h-5 w-5" />
Login with <span className="font-bold">Passkey</span>
</Button>

Expand All @@ -129,7 +130,7 @@ const SignInForm = ({ isGoogleAuthEnabled }: LoginFormProps) => {
type="button"
onClick={signInWithGoogle}
>
<RiGoogleFill className="mr-2 h-4 w-4" />
<Icon name="google-fill" className="mr-2 h-4 w-4" />
Login with <span className="font-bold">Google</span>
</Button>
)}
Expand Down
3 changes: 2 additions & 1 deletion src/components/onboarding/signup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
FormLabel,
FormMessage,
} from "@/components/ui/form";
import { Icon } from "@/components/ui/icon";
import { Input } from "@/components/ui/input";
import { PasswordInput } from "@/components/ui/password-input";
import { api } from "@/trpc/react";
Expand Down Expand Up @@ -79,7 +80,7 @@ const SignUpForm = ({ isGoogleAuthEnabled }: SignUpFormProps) => {
type="button"
onClick={signInWithGoogle}
>
<RiGoogleFill className="mr-2 h-4 w-4" />
<Icon name="google-fill" className="mr-2 h-4 w-4" />
Signup with <span className="font-bold">Google</span>
</Button>

Expand Down
21 changes: 9 additions & 12 deletions src/components/onboarding/verify-email/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
"use client";

import { Button } from "@/components/ui/button";
import { Icon } from "@/components/ui/icon";
import { api } from "@/trpc/react";
import {
RiArrowRightLine,
RiMailCheckLine,
RiMailCloseLine,
} from "@remixicon/react";

import Link from "next/link";
import { useCallback, useEffect, useState } from "react";

Expand All @@ -16,7 +13,7 @@ const VerifyEmail = ({ token }: { token: string }) => {
const [success, setSuccess] = useState<string | undefined>("");

const { mutateAsync } = api.auth.verifyEmail.useMutation({
onSuccess: async ({ message }) => {
onSuccess: ({ message }) => {
setLoading(false);
setSuccess(message);
},
Expand All @@ -26,7 +23,7 @@ const VerifyEmail = ({ token }: { token: string }) => {
},
});

const onSubmit = useCallback(async () => {
const onSubmit = async () => {
if (success || error) return;

if (!token) {
Expand All @@ -42,7 +39,7 @@ const VerifyEmail = ({ token }: { token: string }) => {
setLoading(false);
setError("Something went wrong! Please try again.");
}
}, [token, success, error]);
};

useEffect(() => {
void onSubmit();
Expand Down Expand Up @@ -70,7 +67,7 @@ const VerifyEmail = ({ token }: { token: string }) => {
<>
<div className="mx-auto mb-6 flex h-16 w-16 items-center justify-center rounded-full bg-teal-100">
<span className="text-teal-500">
<RiMailCheckLine className="h-6 w-auto" />
<Icon name="mail-check-line" className="h-6 w-auto" />
</span>
</div>
<h1 className="text-2xl font-semibold tracking-tight">
Expand All @@ -82,7 +79,7 @@ const VerifyEmail = ({ token }: { token: string }) => {
</>
) : (
<>
<RiMailCloseLine className="mb-1 h-10 w-auto" />
<Icon name="mail-close-line" className="mb-1 h-10 w-auto" />
<h1 className="text-2xl font-semibold tracking-tight">
Verification Failed
</h1>
Expand All @@ -96,14 +93,14 @@ const VerifyEmail = ({ token }: { token: string }) => {
<Link href="/signin" className="mt-4">
<Button size="lg">
Continue to Login page
<RiArrowRightLine className="ml-2 h-4 w-4" />
<Icon name="arrow-right-line" className="ml-2 h-4 w-4" />
</Button>
</Link>
) : (
<Link href="/signup" className="mt-4">
<Button size="lg">
Try signing up again
<RiArrowRightLine className="ml-2 h-4 w-4" />
<Icon name="arrow-right-line" className="ml-2 h-4 w-4" />
</Button>
</Link>
)}
Expand Down
1 change: 1 addition & 0 deletions src/components/rbac/role-table.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client";

import { Icon } from "@/components/ui/icon";
import { ADMIN_PERMISSION } from "@/lib/rbac/constants";
import type { TPermission } from "@/lib/rbac/schema";
import { api } from "@/trpc/react";
Expand Down
5 changes: 3 additions & 2 deletions src/components/safe/safe-actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
DropdownMenuContent,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { Icon } from "@/components/ui/icon";
import { RiAddFill, RiSafe2Fill, RiSafeFill } from "@remixicon/react";
import { pushModal } from "../modals";

Expand All @@ -12,7 +13,7 @@ export function SafeActions() {
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button>
<RiAddFill className="mr-2 h-5 w-5" />
<Icon name="add-fill" className="mr-2 h-5 w-5" />
Manage SAFE
</Button>
</DropdownMenuTrigger>
Expand All @@ -32,7 +33,7 @@ export function SafeActions() {
});
}}
>
<RiSafeFill className="mr-2 h-4 w-4" />
<Icon name="safe-fill" className="mr-2 h-4 w-4" />
Create a new SAFE
</Button>
</li>
Expand Down
4 changes: 3 additions & 1 deletion src/components/safe/safe-table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { SortButton } from "@/components/ui/data-table/data-table-buttons";
import { DataTableContent } from "@/components/ui/data-table/data-table-content";
import { DataTableHeader } from "@/components/ui/data-table/data-table-header";
import { DataTablePagination } from "@/components/ui/data-table/data-table-pagination";
import { Icon } from "@/components/ui/icon";
import { getPresignedGetUrl } from "@/server/file-uploads";
import type { RouterOutputs } from "@/trpc/shared";
import { RiFileDownloadLine, RiMore2Fill } from "@remixicon/react";
Expand Down Expand Up @@ -216,7 +217,8 @@ export const columns: ColumnDef<Safe[number]>[] = [
await openFileOnTab(doc.bucket.key);
}}
>
<RiFileDownloadLine
<Icon
name="file-download-line"
type={doc.bucket.mimeType}
className="mx-3 cursor-pointer text-muted-foreground hover:text-primary/80"
/>
Expand Down