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
This commit is contained in:
@@ -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: <CodeSimpleIcon width={15} height={15} />, title: 'Code (Ctrl+E)', className: '' },
|
||||
];
|
||||
|
||||
export default function InlineToolbar({ rect, activeMarks, onToggleMark, onPinChange, usedColors }) {
|
||||
|
||||
Reference in New Issue
Block a user