Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

Commit

Permalink
fix(editor): fix block actions menu button style
Browse files Browse the repository at this point in the history
fix #107
  • Loading branch information
Darmody committed Jul 8, 2022
1 parent d640229 commit d98476e
Show file tree
Hide file tree
Showing 12 changed files with 88 additions and 59 deletions.
4 changes: 4 additions & 0 deletions packages/design-icons/assets/basic/block-action-add.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions packages/design-icons/src/icons/BlockActionAdd.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/design-icons/src/icons/Caution.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/design-icons/src/icons/Protect.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/design-icons/src/index.ts
Expand Up @@ -20,6 +20,7 @@ export { default as ArrowShortcut } from './icons/ArrowShortcut'
export { default as ArrowUp } from './icons/ArrowUp'
export { default as Attention } from './icons/Attention'
export { default as AutoFormat } from './icons/AutoFormat'
export { default as BlockActionAdd } from './icons/BlockActionAdd'
export { default as BlockLevelLink } from './icons/BlockLevelLink'
export { default as BookmarkView } from './icons/BookmarkView'
export { default as Browser } from './icons/Browser'
Expand Down
Expand Up @@ -10,13 +10,13 @@ exports[`BlockActionButton matches snapshot correctly 1`] = `
draggable="true"
>
<button
class="mc-c-iiEeHJ mc-c-iiEeHJ-UZJIs-btnType-text mc-c-iiEeHJ-fcHofs-size-md mc-c-PJLV mc-c-PJLV-klARUB-size-sm ButtonUnstyled-root"
class="mc-c-iiEeHJ mc-c-iiEeHJ-dzgAdI-btnType-unstyled mc-c-iiEeHJ-fcHofs-size-md mc-c-PJLV mc-c-PJLV-klARUB-size-sm ButtonUnstyled-root"
role="button"
type="button"
>
<span
aria-label="drag-secondary"
class="mc-icon mc-icon-drag-secondary"
aria-label="block-action-add"
class="mc-icon mc-icon-block-action-add"
role="img"
>
<svg
Expand All @@ -27,15 +27,13 @@ exports[`BlockActionButton matches snapshot correctly 1`] = `
>
<path
clip-rule="evenodd"
d="M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12Zm11-9a9 9 0 1 0 0 18 9 9 0 0 0 0-18Z"
d="M1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12ZM12 3C7.02943 3 3 7.02943 3 12C3 16.9706 7.02943 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02943 16.9706 3 12 3Z"
fill="#e0e0e0"
fill-rule="evenodd"
/>
<path
clip-rule="evenodd"
d="M7.833 8.5c-.46 0-.833.448-.833 1s.373 1 .833 1h8.334c.46 0 .833-.448.833-1s-.373-1-.833-1H7.833Zm0 5c-.46 0-.833.448-.833 1s.373 1 .833 1h8.334c.46 0 .833-.448.833-1s-.373-1-.833-1H7.833Z"
fill="#35313c"
fill-rule="evenodd"
d="M13 8C13 7.44772 12.5523 7 12 7C11.4477 7 11 7.44772 11 8V11H8C7.44772 11 7 11.4477 7 12C7 12.5523 7.44772 13 8 13H11V16C11 16.5523 11.4477 17 12 17C12.5523 17 13 16.5523 13 16V13H16C16.5523 13 17 12.5523 17 12C17 11.4477 16.5523 11 16 11H13V8Z"
fill="#73707e"
/>
</svg>
</span>
Expand All @@ -54,13 +52,13 @@ exports[`BlockActionButton triggers mouse enter/leave event normally 1`] = `
draggable="true"
>
<button
class="mc-c-iiEeHJ mc-c-iiEeHJ-UZJIs-btnType-text mc-c-iiEeHJ-fcHofs-size-md mc-c-PJLV mc-c-PJLV-klARUB-size-sm ButtonUnstyled-root"
class="mc-c-iiEeHJ mc-c-iiEeHJ-dzgAdI-btnType-unstyled mc-c-iiEeHJ-fcHofs-size-md mc-c-PJLV mc-c-PJLV-klARUB-size-sm ButtonUnstyled-root"
role="button"
type="button"
>
<span
aria-label="drag-secondary"
class="mc-icon mc-icon-drag-secondary"
aria-label="block-action-add"
class="mc-icon mc-icon-block-action-add"
role="img"
>
<svg
Expand All @@ -71,15 +69,13 @@ exports[`BlockActionButton triggers mouse enter/leave event normally 1`] = `
>
<path
clip-rule="evenodd"
d="M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12Zm11-9a9 9 0 1 0 0 18 9 9 0 0 0 0-18Z"
d="M1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12ZM12 3C7.02943 3 3 7.02943 3 12C3 16.9706 7.02943 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02943 16.9706 3 12 3Z"
fill="#dee7fe"
fill-rule="evenodd"
/>
<path
clip-rule="evenodd"
d="M7.833 8.5c-.46 0-.833.448-.833 1s.373 1 .833 1h8.334c.46 0 .833-.448.833-1s-.373-1-.833-1H7.833Zm0 5c-.46 0-.833.448-.833 1s.373 1 .833 1h8.334c.46 0 .833-.448.833-1s-.373-1-.833-1H7.833Z"
d="M13 8C13 7.44772 12.5523 7 12 7C11.4477 7 11 7.44772 11 8V11H8C7.44772 11 7 11.4477 7 12C7 12.5523 7.44772 13 8 13H11V16C11 16.5523 11.4477 17 12 17C12.5523 17 13 16.5523 13 16V13H16C16.5523 13 17 12.5523 17 12C17 11.4477 16.5523 11 16 11H13V8Z"
fill="#356cf9"
fill-rule="evenodd"
/>
</svg>
</span>
Expand All @@ -98,13 +94,13 @@ exports[`BlockActionButton triggers mouse enter/leave event normally 2`] = `
draggable="true"
>
<button
class="mc-c-iiEeHJ mc-c-iiEeHJ-UZJIs-btnType-text mc-c-iiEeHJ-fcHofs-size-md mc-c-PJLV mc-c-PJLV-klARUB-size-sm ButtonUnstyled-root"
class="mc-c-iiEeHJ mc-c-iiEeHJ-dzgAdI-btnType-unstyled mc-c-iiEeHJ-fcHofs-size-md mc-c-PJLV mc-c-PJLV-klARUB-size-sm ButtonUnstyled-root"
role="button"
type="button"
>
<span
aria-label="drag-secondary"
class="mc-icon mc-icon-drag-secondary"
aria-label="block-action-add"
class="mc-icon mc-icon-block-action-add"
role="img"
>
<svg
Expand All @@ -115,15 +111,13 @@ exports[`BlockActionButton triggers mouse enter/leave event normally 2`] = `
>
<path
clip-rule="evenodd"
d="M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12Zm11-9a9 9 0 1 0 0 18 9 9 0 0 0 0-18Z"
d="M1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12ZM12 3C7.02943 3 3 7.02943 3 12C3 16.9706 7.02943 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02943 16.9706 3 12 3Z"
fill="#e0e0e0"
fill-rule="evenodd"
/>
<path
clip-rule="evenodd"
d="M7.833 8.5c-.46 0-.833.448-.833 1s.373 1 .833 1h8.334c.46 0 .833-.448.833-1s-.373-1-.833-1H7.833Zm0 5c-.46 0-.833.448-.833 1s.373 1 .833 1h8.334c.46 0 .833-.448.833-1s-.373-1-.833-1H7.833Z"
fill="#35313c"
fill-rule="evenodd"
d="M13 8C13 7.44772 12.5523 7 12 7C11.4477 7 11 7.44772 11 8V11H8C7.44772 11 7 11.4477 7 12C7 12.5523 7.44772 13 8 13H11V16C11 16.5523 11.4477 17 12 17C12.5523 17 13 16.5523 13 16V13H16C16.5523 13 17 12.5523 17 12C17 11.4477 16.5523 11 16 11H13V8Z"
fill="#73707e"
/>
</svg>
</span>
Expand Down
Expand Up @@ -14,13 +14,13 @@ exports[`BlockActions matches snapshot correctly 1`] = `
draggable="true"
>
<button
class="mc-c-iiEeHJ mc-c-iiEeHJ-UZJIs-btnType-text mc-c-iiEeHJ-fcHofs-size-md mc-c-PJLV mc-c-PJLV-klARUB-size-sm ButtonUnstyled-root"
class="mc-c-iiEeHJ mc-c-iiEeHJ-dzgAdI-btnType-unstyled mc-c-iiEeHJ-fcHofs-size-md mc-c-PJLV mc-c-PJLV-klARUB-size-sm ButtonUnstyled-root"
role="button"
type="button"
>
<span
aria-label="drag-secondary"
class="mc-icon mc-icon-drag-secondary"
aria-label="block-action-add"
class="mc-icon mc-icon-block-action-add"
role="img"
>
<svg
Expand All @@ -31,15 +31,13 @@ exports[`BlockActions matches snapshot correctly 1`] = `
>
<path
clip-rule="evenodd"
d="M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12Zm11-9a9 9 0 1 0 0 18 9 9 0 0 0 0-18Z"
d="M1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12ZM12 3C7.02943 3 3 7.02943 3 12C3 16.9706 7.02943 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02943 16.9706 3 12 3Z"
fill="#e0e0e0"
fill-rule="evenodd"
/>
<path
clip-rule="evenodd"
d="M7.833 8.5c-.46 0-.833.448-.833 1s.373 1 .833 1h8.334c.46 0 .833-.448.833-1s-.373-1-.833-1H7.833Zm0 5c-.46 0-.833.448-.833 1s.373 1 .833 1h8.334c.46 0 .833-.448.833-1s-.373-1-.833-1H7.833Z"
fill="#35313c"
fill-rule="evenodd"
d="M13 8C13 7.44772 12.5523 7 12 7C11.4477 7 11 7.44772 11 8V11H8C7.44772 11 7 11.4477 7 12C7 12.5523 7.44772 13 8 13H11V16C11 16.5523 11.4477 17 12 17C12.5523 17 13 16.5523 13 16V13H16C16.5523 13 17 12.5523 17 12C17 11.4477 16.5523 11 16 11H13V8Z"
fill="#73707e"
/>
</svg>
</span>
Expand Down
Expand Up @@ -203,13 +203,13 @@ exports[`EmbedView matches correct snapshot 1`] = `
draggable="true"
>
<button
class="mc-c-iiEeHJ mc-c-iiEeHJ-UZJIs-btnType-text mc-c-iiEeHJ-fcHofs-size-md mc-c-PJLV mc-c-PJLV-klARUB-size-sm ButtonUnstyled-root"
class="mc-c-iiEeHJ mc-c-iiEeHJ-dzgAdI-btnType-unstyled mc-c-iiEeHJ-fcHofs-size-md mc-c-PJLV mc-c-PJLV-klARUB-size-sm ButtonUnstyled-root"
role="button"
type="button"
>
<span
aria-label="drag-secondary"
class="mc-icon mc-icon-drag-secondary"
aria-label="block-action-add"
class="mc-icon mc-icon-block-action-add"
role="img"
>
<svg
Expand All @@ -220,15 +220,13 @@ exports[`EmbedView matches correct snapshot 1`] = `
>
<path
clip-rule="evenodd"
d="M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12Zm11-9a9 9 0 1 0 0 18 9 9 0 0 0 0-18Z"
d="M1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12ZM12 3C7.02943 3 3 7.02943 3 12C3 16.9706 7.02943 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02943 16.9706 3 12 3Z"
fill="#e0e0e0"
fill-rule="evenodd"
/>
<path
clip-rule="evenodd"
d="M7.833 8.5c-.46 0-.833.448-.833 1s.373 1 .833 1h8.334c.46 0 .833-.448.833-1s-.373-1-.833-1H7.833Zm0 5c-.46 0-.833.448-.833 1s.373 1 .833 1h8.334c.46 0 .833-.448.833-1s-.373-1-.833-1H7.833Z"
fill="#35313c"
fill-rule="evenodd"
d="M13 8C13 7.44772 12.5523 7 12 7C11.4477 7 11 7.44772 11 8V11H8C7.44772 11 7 11.4477 7 12C7 12.5523 7.44772 13 8 13H11V16C11 16.5523 11.4477 17 12 17C12.5523 17 13 16.5523 13 16V13H16C16.5523 13 17 12.5523 17 12C17 11.4477 16.5523 11 16 11H13V8Z"
fill="#73707e"
/>
</svg>
</span>
Expand Down
Expand Up @@ -42,7 +42,7 @@ exports[`documentEditor renders document editor correctly 1`] = `
draggable="true"
>
<button
class="mc-c-iiEeHJ mc-c-iiEeHJ-UZJIs-btnType-text mc-c-iiEeHJ-fcHofs-size-md mc-c-PJLV mc-c-PJLV-klARUB-size-sm ButtonUnstyled-root"
class="mc-c-iiEeHJ mc-c-iiEeHJ-dzgAdI-btnType-unstyled mc-c-iiEeHJ-fcHofs-size-md mc-c-PJLV mc-c-PJLV-klARUB-size-sm ButtonUnstyled-root"
role="button"
type="button"
>
Expand All @@ -66,7 +66,7 @@ exports[`documentEditor renders document editor correctly 1`] = `
<path
clip-rule="evenodd"
d="M7.833 8.5c-.46 0-.833.448-.833 1s.373 1 .833 1h8.334c.46 0 .833-.448.833-1s-.373-1-.833-1H7.833Zm0 5c-.46 0-.833.448-.833 1s.373 1 .833 1h8.334c.46 0 .833-.448.833-1s-.373-1-.833-1H7.833Z"
fill="#35313c"
fill="#73707e"
fill-rule="evenodd"
/>
</svg>
Expand Down Expand Up @@ -107,7 +107,7 @@ exports[`documentEditor renders document editor correctly 1`] = `
draggable="true"
>
<button
class="mc-c-iiEeHJ mc-c-iiEeHJ-UZJIs-btnType-text mc-c-iiEeHJ-fcHofs-size-md mc-c-PJLV mc-c-PJLV-klARUB-size-sm ButtonUnstyled-root"
class="mc-c-iiEeHJ mc-c-iiEeHJ-dzgAdI-btnType-unstyled mc-c-iiEeHJ-fcHofs-size-md mc-c-PJLV mc-c-PJLV-klARUB-size-sm ButtonUnstyled-root"
role="button"
type="button"
>
Expand All @@ -131,7 +131,7 @@ exports[`documentEditor renders document editor correctly 1`] = `
<path
clip-rule="evenodd"
d="M7.833 8.5c-.46 0-.833.448-.833 1s.373 1 .833 1h8.334c.46 0 .833-.448.833-1s-.373-1-.833-1H7.833Zm0 5c-.46 0-.833.448-.833 1s.373 1 .833 1h8.334c.46 0 .833-.448.833-1s-.373-1-.833-1H7.833Z"
fill="#35313c"
fill="#73707e"
fill-rule="evenodd"
/>
</svg>
Expand Down Expand Up @@ -172,7 +172,7 @@ exports[`documentEditor renders document editor correctly 1`] = `
draggable="true"
>
<button
class="mc-c-iiEeHJ mc-c-iiEeHJ-UZJIs-btnType-text mc-c-iiEeHJ-fcHofs-size-md mc-c-PJLV mc-c-PJLV-klARUB-size-sm ButtonUnstyled-root"
class="mc-c-iiEeHJ mc-c-iiEeHJ-dzgAdI-btnType-unstyled mc-c-iiEeHJ-fcHofs-size-md mc-c-PJLV mc-c-PJLV-klARUB-size-sm ButtonUnstyled-root"
role="button"
type="button"
>
Expand All @@ -196,7 +196,7 @@ exports[`documentEditor renders document editor correctly 1`] = `
<path
clip-rule="evenodd"
d="M7.833 8.5c-.46 0-.833.448-.833 1s.373 1 .833 1h8.334c.46 0 .833-.448.833-1s-.373-1-.833-1H7.833Zm0 5c-.46 0-.833.448-.833 1s.373 1 .833 1h8.334c.46 0 .833-.448.833-1s-.373-1-.833-1H7.833Z"
fill="#35313c"
fill="#73707e"
fill-rule="evenodd"
/>
</svg>
Expand Down Expand Up @@ -237,7 +237,7 @@ exports[`documentEditor renders document editor correctly 1`] = `
draggable="true"
>
<button
class="mc-c-iiEeHJ mc-c-iiEeHJ-UZJIs-btnType-text mc-c-iiEeHJ-fcHofs-size-md mc-c-PJLV mc-c-PJLV-klARUB-size-sm ButtonUnstyled-root"
class="mc-c-iiEeHJ mc-c-iiEeHJ-dzgAdI-btnType-unstyled mc-c-iiEeHJ-fcHofs-size-md mc-c-PJLV mc-c-PJLV-klARUB-size-sm ButtonUnstyled-root"
role="button"
type="button"
>
Expand All @@ -261,7 +261,7 @@ exports[`documentEditor renders document editor correctly 1`] = `
<path
clip-rule="evenodd"
d="M7.833 8.5c-.46 0-.833.448-.833 1s.373 1 .833 1h8.334c.46 0 .833-.448.833-1s-.373-1-.833-1H7.833Zm0 5c-.46 0-.833.448-.833 1s.373 1 .833 1h8.334c.46 0 .833-.448.833-1s-.373-1-.833-1H7.833Z"
fill="#35313c"
fill="#73707e"
fill-rule="evenodd"
/>
</svg>
Expand Down Expand Up @@ -302,7 +302,7 @@ exports[`documentEditor renders document editor correctly 1`] = `
draggable="true"
>
<button
class="mc-c-iiEeHJ mc-c-iiEeHJ-UZJIs-btnType-text mc-c-iiEeHJ-fcHofs-size-md mc-c-PJLV mc-c-PJLV-klARUB-size-sm ButtonUnstyled-root"
class="mc-c-iiEeHJ mc-c-iiEeHJ-dzgAdI-btnType-unstyled mc-c-iiEeHJ-fcHofs-size-md mc-c-PJLV mc-c-PJLV-klARUB-size-sm ButtonUnstyled-root"
role="button"
type="button"
>
Expand All @@ -326,7 +326,7 @@ exports[`documentEditor renders document editor correctly 1`] = `
<path
clip-rule="evenodd"
d="M7.833 8.5c-.46 0-.833.448-.833 1s.373 1 .833 1h8.334c.46 0 .833-.448.833-1s-.373-1-.833-1H7.833Zm0 5c-.46 0-.833.448-.833 1s.373 1 .833 1h8.334c.46 0 .833-.448.833-1s-.373-1-.833-1H7.833Z"
fill="#35313c"
fill="#73707e"
fill-rule="evenodd"
/>
</svg>
Expand Down

0 comments on commit d98476e

Please sign in to comment.