Skip to content

Commit

Permalink
♻️ fix: field icon style
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmclin2 committed Jul 24, 2023
1 parent bacb225 commit db6ec57
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
5 changes: 2 additions & 3 deletions src/FieldIcon/style.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { createStyles, css, cx } from '@ant-design/pro-editor';
import { createStyles } from '../theme';

export const useStyle = createStyles((_, prefixCls: string) => {
const { token } = _;
export const useStyle = createStyles(({ css, cx, token }, prefixCls: string) => {
return {
icon: cx(
`${prefixCls}`,
Expand Down
4 changes: 2 additions & 2 deletions src/FieldSelect/style.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createStyles, css, cx } from '@ant-design/pro-editor';
import { createStyles } from '../theme';

export const useStyle = createStyles(({ token }, prefixCls: string) => {
export const useStyle = createStyles(({ token, css, cx }, prefixCls: string) => {
return {
select: cx(
`${prefixCls}`,
Expand Down
4 changes: 2 additions & 2 deletions src/FieldTitle/style.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createStyles, css, cx } from '@ant-design/pro-editor';
import { createStyles } from '../theme';

export const useStyle = createStyles(({ token }, { prefixCls, checkable }) => {
export const useStyle = createStyles(({ token, css, cx }, { prefixCls, checkable }) => {
return {
content: cx(
`${prefixCls}-content`,
Expand Down
2 changes: 1 addition & 1 deletion src/IconPicker/components/IconList/IconThumbnail.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createStyles } from 'antd-style';
import type { FC } from 'react';
import { memo } from 'react';
import { Flexbox } from 'react-layout-kit';
import { createStyles } from '../../../theme';
import type { IconUnit } from '../../types';

import IconItem from '../../features/IconRender';
Expand Down
2 changes: 1 addition & 1 deletion src/IconPicker/components/IconList/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createStyles } from 'antd-style';
import type { FC } from 'react';
import { memo } from 'react';
import { createStyles } from '../../../theme';

import { useStore } from '../../store';
import IconThumbnail from './IconThumbnail';
Expand Down
2 changes: 1 addition & 1 deletion src/LevaPanel/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createStyles } from 'antd-style';
import { LevaPanel, LevaStoreProvider, useCreateStore } from 'leva';
import { CSSProperties, ReactNode, memo } from 'react';
import { createStyles } from '../theme';
import Schema, { SchemaProps } from './Schema';

const useStyles = createStyles(
Expand Down
2 changes: 1 addition & 1 deletion src/SortableTree/components/TreeItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import type { UniqueIdentifier } from '@dnd-kit/core';
import { AnimateLayoutChanges, useSortable } from '@dnd-kit/sortable';
import { CSS } from '@dnd-kit/utilities';
import { useClickAway } from 'ahooks';
import { createStyles } from 'antd-style';
import type { CSSProperties, FC, HTMLAttributes } from 'react';
import { memo, useRef } from 'react';
import { shallow } from 'zustand/shallow';
import { createStyles } from '../../../theme';

import { CollapseAction, DeleteAction, HandleAction } from '@/ActionIcon';

Expand Down

0 comments on commit db6ec57

Please sign in to comment.