Skip to content

Commit

Permalink
chore: rename Bx prefix to Icon
Browse files Browse the repository at this point in the history
  • Loading branch information
dcshzj committed Jul 31, 2024
1 parent 2085ef6 commit a598a4c
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 33 deletions.
8 changes: 0 additions & 8 deletions apps/studio/src/assets/index.ts

This file was deleted.

34 changes: 17 additions & 17 deletions apps/studio/src/components/PageEditor/MenuBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ import {
import { MdSubscript, MdSuperscript } from "react-icons/md"

import {
BxAddColLeft,
BxAddColRight,
BxAddRowAbove,
BxAddRowBelow,
BxDelCol,
BxDelRow,
BxMergeCells,
BxSplitCell,
} from "~/assets"
IconAddColLeft,
IconAddColRight,
IconAddRowAbove,
IconAddRowBelow,
IconDelCol,
IconDelRow,
IconMergeCells,
IconSplitCell,
} from "~/components/icons"
import { MenuItem } from "./MenuItem"
import { TableSettingsModal } from "./TableSettingsModal"

Expand Down Expand Up @@ -256,42 +256,42 @@ export const MenuBar = ({ editor }: { editor: Editor }) => {
},
{
type: "item",
icon: () => <Icon as={BxAddColRight} />,
icon: () => <Icon as={IconAddColRight} />,
title: "Add column after",
action: () => editor.chain().focus().addColumnAfter().run(),
isHidden: !editor.isActive("table"),
},
{
type: "item",
icon: () => <Icon as={BxAddColLeft} />,
icon: () => <Icon as={IconAddColLeft} />,
title: "Add column before",
action: () => editor.chain().focus().addColumnBefore().run(),
isHidden: !editor.isActive("table"),
},
{
type: "item",
icon: () => <Icon as={BxDelCol} />,
icon: () => <Icon as={IconDelCol} />,
title: "Delete column",
action: () => editor.chain().focus().deleteColumn().run(),
isHidden: !editor.isActive("table"),
},
{
type: "item",
icon: () => <Icon as={BxAddRowAbove} />,
icon: () => <Icon as={IconAddRowAbove} />,
title: "Add row before",
action: () => editor.chain().focus().addRowBefore().run(),
isHidden: !editor.isActive("table"),
},
{
type: "item",
icon: () => <Icon as={BxAddRowBelow} />,
icon: () => <Icon as={IconAddRowBelow} />,
title: "Add row after",
action: () => editor.chain().focus().addRowAfter().run(),
isHidden: !editor.isActive("table"),
},
{
type: "item",
icon: () => <Icon as={BxDelRow} />,
icon: () => <Icon as={IconDelRow} />,
title: "Delete row",
action: () => editor.chain().focus().deleteRow().run(),
isHidden: !editor.isActive("table"),
Expand All @@ -302,14 +302,14 @@ export const MenuBar = ({ editor }: { editor: Editor }) => {
},
{
type: "item",
icon: () => <Icon as={BxMergeCells} />,
icon: () => <Icon as={IconMergeCells} />,
title: "Merge cells",
action: () => editor.chain().focus().mergeCells().run(),
isHidden: !editor.isActive("table"),
},
{
type: "item",
icon: () => <Icon as={BxSplitCell} />,
icon: () => <Icon as={IconSplitCell} />,
title: "Split cell",
action: () => editor.chain().focus().splitCell().run(),
isHidden: !editor.isActive("table"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { chakra } from "@chakra-ui/react"

export const BxAddColLeft = chakra(
export const IconAddColLeft = chakra(
(props: React.SVGProps<SVGSVGElement>): JSX.Element => {
return (
<svg
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { chakra } from "@chakra-ui/react"

export const BxAddColRight = chakra(
export const IconAddColRight = chakra(
(props: React.SVGProps<SVGSVGElement>): JSX.Element => {
return (
<svg
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { chakra } from "@chakra-ui/react"

export const BxAddRowAbove = chakra(
export const IconAddRowAbove = chakra(
(props: React.SVGProps<SVGSVGElement>): JSX.Element => {
return (
<svg
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { chakra } from "@chakra-ui/react"

export const BxAddRowBelow = chakra(
export const IconAddRowBelow = chakra(
(props: React.SVGProps<SVGSVGElement>): JSX.Element => {
return (
<svg
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { chakra } from "@chakra-ui/react"

export const BxDelCol = chakra(
export const IconDelCol = chakra(
(props: React.SVGProps<SVGSVGElement>): JSX.Element => {
return (
<svg
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { chakra } from "@chakra-ui/react"

export const BxDelRow = chakra(
export const IconDelRow = chakra(
(props: React.SVGProps<SVGSVGElement>): JSX.Element => {
return (
<svg
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { chakra } from "@chakra-ui/react"

export const BxMergeCells = chakra((props: React.SVGProps<SVGSVGElement>) => {
export const IconMergeCells = chakra((props: React.SVGProps<SVGSVGElement>) => {
return (
<svg
width="24"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { chakra } from "@chakra-ui/react"

export const BxSplitCell = chakra((props: React.SVGProps<SVGSVGElement>) => {
export const IconSplitCell = chakra((props: React.SVGProps<SVGSVGElement>) => {
return (
<svg
width="24"
Expand Down
8 changes: 8 additions & 0 deletions apps/studio/src/components/icons/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export * from "./IconAddColLeft"
export * from "./IconAddColRight"
export * from "./IconAddRowAbove"
export * from "./IconAddRowBelow"
export * from "./IconDelCol"
export * from "./IconDelRow"
export * from "./IconMergeCells"
export * from "./IconSplitCell"

0 comments on commit a598a4c

Please sign in to comment.