Skip to content

Commit

Permalink
plus icon
Browse files Browse the repository at this point in the history
  • Loading branch information
liuliu-dev committed Dec 12, 2024
1 parent 4d108ba commit 9f5d54a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions web/renderer/components/CreateDatabase/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
@apply h-4 w-4;
}
}

.text {
@apply ml-2;
}
5 changes: 3 additions & 2 deletions web/renderer/components/CreateDatabase/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
import useMutation from "@hooks/useMutation";
import { database } from "@lib/urls";
import { AiOutlinePlusCircle } from "@react-icons/all-files/ai/AiOutlinePlusCircle";
import { AiOutlinePlus } from "@react-icons/all-files/ai/AiOutlinePlus";
import cx from "classnames";
import { useRouter } from "next/router";
import { SyntheticEvent, useState } from "react";
Expand Down Expand Up @@ -55,8 +56,8 @@ export default function CreateDatabase(props: Props) {
onClick={() => setIsOpen(true)}
className={cx(css.createDB, props.buttonClassName)}
>
<AiOutlinePlusCircle />
{props.showText && "Create database"}
{props.showText ? <AiOutlinePlus /> : <AiOutlinePlusCircle />}
{props.showText && <span className={css.text}>Create database</span>}
</Button.Link>
<ModalOuter
isOpen={isOpen}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ export default function DatabasesPage() {
No databases found. Create a database to get started.
</p>
)}
<CreateDatabase buttonClassName={css.button} isPostgres={isPostgres} />
<CreateDatabase
buttonClassName={css.button}
isPostgres={isPostgres}
showText
/>
<ErrorMsg err={res.error} />
</Loader>
</MainLayout>
Expand Down

0 comments on commit 9f5d54a

Please sign in to comment.