Skip to content

Commit

Permalink
chore: remove unused icons
Browse files Browse the repository at this point in the history
  • Loading branch information
pd4d10 committed Oct 4, 2023
1 parent d65a86f commit adaf9e3
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 24 deletions.
8 changes: 0 additions & 8 deletions packages/bytemd/src/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,6 @@ export function getBuiltinActions(
type: 'dropdown',
actions: [1, 2, 3, 4, 5, 6].map((level) => ({
title: locale[`h${level}` as keyof BytemdLocale],
icon: [
icons.H1,
icons.H2,
icons.H3,
icons.LevelFourTitle,
icons.LevelFiveTitle,
icons.LevelSixTitle,
][level - 1],
cheatsheet:
level <= 3
? `${'#'.repeat(level)} ${locale.headingText}`
Expand Down
9 changes: 0 additions & 9 deletions packages/bytemd/src/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@ export const icons = {
Close:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="m8 8 32 32M8 40 40 8"/></svg>',
H: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M12 5v38M36 5v38M12 24h24"/></svg>',
H1: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M6 8v32M25 8v32M6 24h19M34.226 24 39 19.017V40"/></svg>',
H2: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M6 8v32M24 8v32M7 24h16M32 25c0-3.167 2.667-5 5-5s5 1.833 5 5c0 5.7-10 9.933-10 15h10"/></svg>',
H3: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M6 8v32M24 8v32M7 24h16M32 20h10l-7 9c4 0 7 2 7 6s-3 5-5 5c-2.381 0-4-1-5-2.1"/></svg>',
LevelFourTitle:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M6 8v32M24 8v32M7 24h16M39.977 40V20L31 32.997v2.023h12"/></svg>',
LevelFiveTitle:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M6 8v32M24 8v32M7 24h16M40 21.01h-8v7.024C32 28 34 27 37 27s4 2.534 4 6.5-1 6.5-5 6.5c-3 0-4-2-4-3.992"/></svg>',
LevelSixTitle:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M6 8v32M24 8v32M7 24h16"/><path stroke="currentColor" stroke-width="4" d="M36.5 40a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M41.596 24.74C40.778 22.545 38.804 21 36.5 21c-3.038 0-5.5 2.686-5.5 6v7"/></svg>',
TextBold:
'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M24 24c5.506 0 9.969-4.477 9.969-10S29.506 4 24 4H11v20h13ZM28.031 44C33.537 44 38 39.523 38 34s-4.463-10-9.969-10H11v20h17.031Z" clip-rule="evenodd"/></svg>',
TextItalic:
Expand Down
8 changes: 1 addition & 7 deletions scripts/icon.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ const meta = {
'Close',

'H',
'H1',
'H2',
'H3',
'LevelFourTitle',
'LevelFiveTitle',
'LevelSixTitle',
'TextBold',
'TextItalic',
'Quote',
Expand Down Expand Up @@ -50,7 +44,7 @@ for (let [p, keys] of Object.entries(meta)) {
fs.writeFileSync(
`./packages/${p}/icons.ts`,
`// DO NOT EDIT, generated by scripts/icon.ts
export const icons=${JSON.stringify(obj)}`
export const icons=${JSON.stringify(obj)}`,
)
}

Expand Down

0 comments on commit adaf9e3

Please sign in to comment.