Refactored icons.
This commit is contained in:
1 parent
18eceee4c4
commit
99330a1a4d
86 files changed
+310
-273
No files matched your search
@@ -1,15 +1,7 @@
|
||||
import {
|
||||
Button,
|
||||
Icon,
|
||||
Text,
|
||||
Modal,
|
||||
Icons,
|
||||
DialogTrigger,
|
||||
Dialog,
|
||||
useToast,
|
||||
} from '@umami/react-zen';
|
||||
import { Button, Icon, Text, Modal, DialogTrigger, Dialog, useToast } from '@umami/react-zen';
|
||||
import { UserAddForm } from './UserAddForm';
|
||||
import { useMessages, useModified } from '@/components/hooks';
|
||||
import { Plus } from '@/components/icons';
|
||||
|
||||
export function UserAddButton({ onSave }: { onSave?: () => void }) {
|
||||
const { formatMessage, labels, messages } = useMessages();
|
||||
@@ -26,7 +18,7 @@ export function UserAddButton({ onSave }: { onSave?: () => void }) {
|
||||
<DialogTrigger>
|
||||
<Button variant="primary" data-test="button-create-user">
|
||||
<Icon>
|
||||
<Icons.Plus />
|
||||
<Plus />
|
||||
</Icon>
|
||||
<Text>{formatMessage(labels.createUser)}</Text>
|
||||
</Button>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Button, Icon, Icons, Modal, DialogTrigger, Dialog, Text } from '@umami/react-zen';
|
||||
import { Button, Icon, Modal, DialogTrigger, Dialog, Text } from '@umami/react-zen';
|
||||
import { useMessages, useLoginQuery } from '@/components/hooks';
|
||||
import { Trash } from '@/components/icons';
|
||||
import { UserDeleteForm } from './UserDeleteForm';
|
||||
|
||||
export function UserDeleteButton({
|
||||
@@ -18,7 +19,7 @@ export function UserDeleteButton({
|
||||
<DialogTrigger>
|
||||
<Button isDisabled={userId === user?.id} data-test="button-delete">
|
||||
<Icon size="sm">
|
||||
<Icons.Trash />
|
||||
<Trash />
|
||||
</Icon>
|
||||
<Text>{formatMessage(labels.delete)}</Text>
|
||||
</Button>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { useState } from 'react';
|
||||
import {
|
||||
Row,
|
||||
Text,
|
||||
Icon,
|
||||
Icons,
|
||||
DataTable,
|
||||
DataColumn,
|
||||
MenuItem,
|
||||
@@ -10,12 +10,13 @@ import {
|
||||
Modal,
|
||||
Dialog,
|
||||
} from '@umami/react-zen';
|
||||
import Link from 'next/link';
|
||||
import { formatDistance } from 'date-fns';
|
||||
import { ROLES } from '@/lib/constants';
|
||||
import { Trash } from '@/components/icons';
|
||||
import { useMessages, useLocale } from '@/components/hooks';
|
||||
import { Edit } from '@/components/icons';
|
||||
import { MenuButton } from '@/components/input/MenuButton';
|
||||
import Link from 'next/link';
|
||||
import { useState } from 'react';
|
||||
import { UserDeleteForm } from '@/app/(main)/settings/users/UserDeleteForm';
|
||||
|
||||
export function UsersTable({
|
||||
@@ -64,7 +65,7 @@ export function UsersTable({
|
||||
<MenuItem href={`/settings/users/${id}`} data-test="link-button-edit">
|
||||
<Row alignItems="center" gap>
|
||||
<Icon>
|
||||
<Icons.Edit />
|
||||
<Edit />
|
||||
</Icon>
|
||||
<Text>{formatMessage(labels.edit)}</Text>
|
||||
</Row>
|
||||
@@ -77,7 +78,7 @@ export function UsersTable({
|
||||
>
|
||||
<Row alignItems="center" gap>
|
||||
<Icon>
|
||||
<Icons.Trash />
|
||||
<Trash />
|
||||
</Icon>
|
||||
<Text>{formatMessage(labels.delete)}</Text>
|
||||
</Row>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useContext } from 'react';
|
||||
import { Tabs, Tab, TabList, TabPanel } from '@umami/react-zen';
|
||||
import { Icons } from '@/components/icons';
|
||||
import { User } from '@/components/icons';
|
||||
import { UserEditForm } from './UserEditForm';
|
||||
import { SectionHeader } from '@/components/common/SectionHeader';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
@@ -13,7 +13,7 @@ export function UserSettings({ userId }: { userId: string }) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<SectionHeader title={user?.username} icon={<Icons.User />} />
|
||||
<SectionHeader title={user?.username} icon={<User />} />
|
||||
<Tabs>
|
||||
<TabList>
|
||||
<Tab id="details">{formatMessage(labels.details)}</Tab>
|
||||
|
||||
Reference in new issue
Block a user