From a73357b7591b63d07bc46bbd9f76e50ab6586f66 Mon Sep 17 00:00:00 2001 From: Hyko Date: Fri, 24 Apr 2026 21:06:07 -0400 Subject: [PATCH] refactor(ui): replace inline svg icons with icon components - replace inline checkmark svg in ColorPicker with Tick02Icon - replace inline sort arrow svg in Table with ArrowDown01Icon - add ArrowDown01Icon to shared icons index --- src/shared/components/ColorPicker.client.js | 7 ++----- src/shared/components/Table.js | 10 ++-------- src/shared/icons/index.js | 6 ++++++ 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/shared/components/ColorPicker.client.js b/src/shared/components/ColorPicker.client.js index a102848..d65d80a 100644 --- a/src/shared/components/ColorPicker.client.js +++ b/src/shared/components/ColorPicker.client.js @@ -1,6 +1,7 @@ 'use client'; import { useState, useRef, useEffect } from 'react'; +import { Tick02Icon } from '@zen/core/shared/icons'; const ROW1 = ['#4489ed', '#2a9db0', '#43b53c', '#5e7b4e', '#f5c211', '#f7581f', '#ff2b2b', '#ff2e63', '#f540ed', '#b34ce9', '#818faf', '#c0bfbc']; const ROW2 = ['#2657cf', '#24687a', '#287124', '#384d2f', '#c68408', '#c0280e', '#ca0505', '#ce0245', '#b417a7', '#8021aa', '#4e5b7e', '#75746f']; @@ -9,11 +10,7 @@ const PRESET_COLORS = [...ROW1, ...ROW2, ...ROW3]; const isValidHex = (hex) => /^#[0-9a-fA-F]{6}$/.test(hex); -const Checkmark = () => ( - - - -); +const Checkmark = () => ; const ColorPicker = ({ value, diff --git a/src/shared/components/Table.js b/src/shared/components/Table.js index 3899da9..104a401 100644 --- a/src/shared/components/Table.js +++ b/src/shared/components/Table.js @@ -3,7 +3,7 @@ import React from 'react'; import Badge from './Badge'; import Button from './Button'; -import { TorriGateIcon } from '../icons/index.js'; +import { TorriGateIcon, ArrowDown01Icon } from '@zen/core/shared/icons'; const ROW_SIZE = { sm: { cell: 'px-4 py-[11px]', header: 'px-4 py-[9px]', mobile: 'p-4' }, @@ -41,13 +41,7 @@ const Table = ({ const isDesc = isActive && sortOrder === 'desc'; return ( - - - + ); }; diff --git a/src/shared/icons/index.js b/src/shared/icons/index.js index 243ba55..90f6f47 100644 --- a/src/shared/icons/index.js +++ b/src/shared/icons/index.js @@ -525,4 +525,10 @@ export const Menu01Icon = (props) => ( +); + +export const ArrowDown01Icon = (props) => ( + + + ); \ No newline at end of file