Skip to content

Commit

Permalink
fix: fix icons on rich text editor component
Browse files Browse the repository at this point in the history
  • Loading branch information
glenkurniawan-adslot committed Oct 16, 2023
1 parent 4a6f6fd commit 722293e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/RichTextEditor/BlockStyleButtons.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import BulletIcon from '../../styles/icons/bullet.svg';
import NumberIcon from '../../styles/icons/number.svg';

const BLOCK_TYPES = [
{ label: <BulletIcon data-testid="bullet" />, style: 'unordered-list-item', ariaLabel: 'Unordered list' },
{ label: <NumberIcon data-testid="number" />, style: 'ordered-list-item', ariaLabel: 'Ordered list' },
{ label: <img src={BulletIcon} data-testid="bullet" />, style: 'unordered-list-item', ariaLabel: 'Unordered list' },

Check failure on line 8 in src/components/RichTextEditor/BlockStyleButtons.jsx

View workflow job for this annotation

GitHub Actions / build (18.x)

img elements must have an alt prop, either with meaningful text, or an empty string for decorative images
{ label: <img src={NumberIcon} data-testid="number" />, style: 'ordered-list-item', ariaLabel: 'Ordered list' },

Check failure on line 9 in src/components/RichTextEditor/BlockStyleButtons.jsx

View workflow job for this annotation

GitHub Actions / build (18.x)

img elements must have an alt prop, either with meaningful text, or an empty string for decorative images
];

const BlockStyleButtons = (props) => {
Expand Down
6 changes: 3 additions & 3 deletions src/components/RichTextEditor/InlineStyleButtons.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import ItalicIcon from '../../styles/icons/italic.svg';
import UnderlineIcon from '../../styles/icons/underline.svg';

const INLINE_STYLES = [
{ label: <BoldIcon data-testid="bold" />, style: 'BOLD', ariaLabel: 'Bold' },
{ label: <ItalicIcon data-testid="italics" aria-label="italic" />, style: 'ITALIC', ariaLabel: 'Italic' },
{ label: <img src={BoldIcon} data-testid="bold" />, style: 'BOLD', ariaLabel: 'Bold' },

Check failure on line 9 in src/components/RichTextEditor/InlineStyleButtons.jsx

View workflow job for this annotation

GitHub Actions / build (18.x)

img elements must have an alt prop, either with meaningful text, or an empty string for decorative images
{ label: <img src={ItalicIcon} data-testid="italics" aria-label="italic" />, style: 'ITALIC', ariaLabel: 'Italic' },
{
label: <UnderlineIcon data-testid="underline" aria-label="Underline" />,
label: <img src={UnderlineIcon} data-testid="underline" aria-label="Underline" />,
style: 'UNDERLINE',
ariaLabel: 'Underline',
},
Expand Down

0 comments on commit 722293e

Please sign in to comment.