From 741bf39a3968d5e52e67c6667a97b6cf3e8e8e17 Mon Sep 17 00:00:00 2001 From: Hyko Date: Sat, 25 Apr 2026 19:19:24 -0400 Subject: [PATCH] feat(ui): replace code button text label with CodeSimpleIcon - add CodeSimpleIcon svg to shared icons index - update inline toolbar code button to use CodeSimpleIcon instead of text label --- src/shared/components/BlockEditor/inline/Toolbar.client.js | 4 ++-- src/shared/icons/index.js | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/shared/components/BlockEditor/inline/Toolbar.client.js b/src/shared/components/BlockEditor/inline/Toolbar.client.js index cba1d56..16187d4 100644 --- a/src/shared/components/BlockEditor/inline/Toolbar.client.js +++ b/src/shared/components/BlockEditor/inline/Toolbar.client.js @@ -1,7 +1,7 @@ 'use client'; import React, { useEffect, useLayoutEffect, useRef, useState } from 'react'; -import { TextColorIcon, HighlighterIcon, Link02Icon } from '@zen/core/shared/icons'; +import { TextColorIcon, HighlighterIcon, Link02Icon, CodeSimpleIcon } from '@zen/core/shared/icons'; import { INLINE_COLORS, INLINE_COLOR_KEYS, markKey } from './types.js'; // Toolbar flottant de formatage. Affiché tant qu'une sélection non-vide @@ -20,7 +20,7 @@ const SIMPLE_BUTTONS = [ { type: 'italic', label: 'I', title: 'Italique (Ctrl+I)', className: 'italic' }, { type: 'underline', label: 'U', title: 'Soulignement (Ctrl+U)', className: 'underline' }, { type: 'strike', label: 'S', title: 'Barré', className: 'line-through' }, - { type: 'code', label: '', title: 'Code (Ctrl+E)', className: 'font-mono text-[11px]' }, + { type: 'code', label: , title: 'Code (Ctrl+E)', className: '' }, ]; export default function InlineToolbar({ rect, activeMarks, onToggleMark, onPinChange, usedColors }) { diff --git a/src/shared/icons/index.js b/src/shared/icons/index.js index 53a3e64..23bdfeb 100644 --- a/src/shared/icons/index.js +++ b/src/shared/icons/index.js @@ -685,4 +685,11 @@ export const Image01Icon = (props) => ( +); + +export const CodeSimpleIcon = (props) => ( + + + + ); \ No newline at end of file