mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-23 12:46:42 +02:00
feat(icons): migrate to phosphor-svelte for all icon usage
- Replace custom Icon.svelte component with phosphor-svelte library
- Remove iconPaths.ts with manually maintained SVG paths
- Update @manacore/shared-icons to re-export phosphor-svelte
- Migrate shared-ui Modal and ConfirmationModal components
- Migrate shared-theme-ui ThemeToggle and ThemeModeSelector
- Migrate all chat app components to use Phosphor Icons
- All apps now use consistent icon API: <IconName size={24} weight="bold" />
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
655da23d14
commit
b97149ac12
17 changed files with 255 additions and 451 deletions
|
|
@ -31,7 +31,7 @@
|
|||
* ```
|
||||
*/
|
||||
|
||||
import { Icon } from '@manacore/shared-icons';
|
||||
import { Warning, WarningCircle, Info } from '@manacore/shared-icons';
|
||||
import Modal from './Modal.svelte';
|
||||
import { Text, Button } from '../atoms';
|
||||
|
||||
|
|
@ -72,20 +72,17 @@
|
|||
|
||||
const variantConfig: Record<
|
||||
ConfirmationVariant,
|
||||
{ iconName: string; iconColor: string; buttonVariant: 'danger' | 'primary' }
|
||||
{ iconColor: string; buttonVariant: 'danger' | 'primary' }
|
||||
> = {
|
||||
danger: {
|
||||
iconName: 'alert-triangle',
|
||||
iconColor: 'text-red-500',
|
||||
buttonVariant: 'danger',
|
||||
},
|
||||
warning: {
|
||||
iconName: 'alert-circle',
|
||||
iconColor: 'text-yellow-500',
|
||||
buttonVariant: 'primary',
|
||||
},
|
||||
info: {
|
||||
iconName: 'info',
|
||||
iconColor: 'text-blue-500',
|
||||
buttonVariant: 'primary',
|
||||
},
|
||||
|
|
@ -100,8 +97,14 @@
|
|||
|
||||
<Modal {visible} {onClose} {title} maxWidth="sm">
|
||||
{#snippet icon()}
|
||||
<div class="p-2 rounded-full bg-menu-hover">
|
||||
<Icon name={config.iconName} size={20} class={config.iconColor} />
|
||||
<div class="p-2 rounded-full bg-menu-hover {config.iconColor}">
|
||||
{#if variant === 'danger'}
|
||||
<Warning size={20} weight="bold" />
|
||||
{:else if variant === 'warning'}
|
||||
<WarningCircle size={20} weight="bold" />
|
||||
{:else}
|
||||
<Info size={20} weight="bold" />
|
||||
{/if}
|
||||
</div>
|
||||
{/snippet}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts">
|
||||
import type { Snippet } from 'svelte';
|
||||
import { Icon } from '@manacore/shared-icons';
|
||||
import { X } from '@manacore/shared-icons';
|
||||
import Text from '../atoms/Text.svelte';
|
||||
|
||||
interface Props {
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
class="p-2 rounded-full hover:bg-menu-hover transition-colors"
|
||||
aria-label="Close"
|
||||
>
|
||||
<Icon name="x" size={20} class="text-theme-muted" />
|
||||
<X size={20} weight="bold" class="text-theme-muted" />
|
||||
</button>
|
||||
</div>
|
||||
{/if}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue