Skip to content

Commit

Permalink
feat: change icons (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
kunish authored Jul 10, 2023
1 parent e64285c commit 9c297b3
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/components/Section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const Section = ({
title,
icon,
bordered,
iconPlus,
onCreate,
actions,
highlight,
Expand All @@ -23,6 +24,7 @@ export const Section = ({
title: string
icon?: React.ReactNode
bordered?: boolean
iconPlus?: React.ReactNode
onCreate: () => void
actions?: React.ReactNode
highlight?: boolean
Expand All @@ -47,9 +49,7 @@ export const Section = ({
<Group>
{actions}

<ActionIcon onClick={onCreate}>
<IconPlus />
</ActionIcon>
<ActionIcon onClick={onCreate}>{iconPlus || <IconPlus />}</ActionIcon>
</Group>
</Group>

Expand Down
4 changes: 2 additions & 2 deletions src/components/SimpleCard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ActionIcon, Card, Group, Indicator, Modal, Title, UnstyledButton } from '@mantine/core'
import { useDisclosure } from '@mantine/hooks'
import { modals } from '@mantine/modals'
import { IconDetails, IconTrash } from '@tabler/icons-react'
import { IconEye, IconTrash } from '@tabler/icons-react'
import { Fragment } from 'react'
import { useTranslation } from 'react-i18next'

Expand Down Expand Up @@ -38,7 +38,7 @@ export const SimpleCard = ({
{actions}

<ActionIcon size="xs" onClick={openDetailsModal}>
<IconDetails />
<IconEye />
</ActionIcon>

{!selected && onRemove && (
Expand Down
4 changes: 2 additions & 2 deletions src/components/UpdateSubscriptionAction.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ActionIcon } from '@mantine/core'
import { IconDownload } from '@tabler/icons-react'
import { IconRefresh } from '@tabler/icons-react'

import { useUpdateSubscriptionsMutation } from '~/apis'

Expand All @@ -12,7 +12,7 @@ export const UpdateSubscriptionAction = ({ id, loading }: { id: string; loading?
size="xs"
onClick={() => updateSubscriptionsMutation.mutate([id])}
>
<IconDownload />
<IconRefresh />
</ActionIcon>
)
}
9 changes: 5 additions & 4 deletions src/pages/Orchestrate/Node.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ActionIcon, Spoiler, Text, useMantineTheme } from '@mantine/core'
import { useDisclosure } from '@mantine/hooks'
import { IconCloud, IconDetails, IconFileImport } from '@tabler/icons-react'
import { IconCloud, IconCloudPlus, IconEye, IconFileImport } from '@tabler/icons-react'
import { useRef } from 'react'
import { useTranslation } from 'react-i18next'

Expand Down Expand Up @@ -30,9 +30,10 @@ export const NodeResource = () => {
<Section
title={t('node')}
icon={<IconCloud />}
onCreate={openConfigureNodeFormModal}
iconPlus={<IconCloudPlus />}
onCreate={openImportNodeFormModal}
actions={
<ActionIcon onClick={openImportNodeFormModal}>
<ActionIcon onClick={openConfigureNodeFormModal}>
<IconFileImport />
</ActionIcon>
}
Expand Down Expand Up @@ -61,7 +62,7 @@ export const NodeResource = () => {
openQRCodeModal()
}}
>
<IconDetails />
<IconEye />
</ActionIcon>
}
onRemove={() => removeNodesMutation.mutate([id])}
Expand Down
5 changes: 3 additions & 2 deletions src/pages/Orchestrate/Subscription.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Accordion, ActionIcon, Group, Spoiler, Text } from '@mantine/core'
import { useDisclosure } from '@mantine/hooks'
import { IconCloudComputing, IconDetails, IconDownload } from '@tabler/icons-react'
import { IconCloudComputing, IconCloudPlus, IconDownload, IconEye } from '@tabler/icons-react'
import dayjs from 'dayjs'
import { Fragment, useRef } from 'react'
import { useTranslation } from 'react-i18next'
Expand Down Expand Up @@ -37,6 +37,7 @@ export const SubscriptionResource = () => {
<Section
title={t('subscription')}
icon={<IconCloudComputing />}
iconPlus={<IconCloudPlus />}
onCreate={openImportSubscriptionFormModal}
bordered
actions={
Expand Down Expand Up @@ -72,7 +73,7 @@ export const SubscriptionResource = () => {
openQRCodeModal()
}}
>
<IconDetails />
<IconEye />
</ActionIcon>
<UpdateSubscriptionAction id={subscriptionID} loading={updateSubscriptionsMutation.isLoading} />
</Fragment>
Expand Down

0 comments on commit 9c297b3

Please sign in to comment.