Skip to content

Commit 893e5f2

Browse files
committed
fix: rendering the colorpicker portal branch
1 parent 268f02a commit 893e5f2

File tree

4 files changed

+21
-20
lines changed

4 files changed

+21
-20
lines changed

src/components/ColorPicker/index.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ const ColorPicker = ({
8484
isBorder={true}>
8585
{children}
8686
</IconButton>
87-
<Portal>
88-
{isOpenColorPicker && (
87+
88+
{isOpenColorPicker && (
89+
<Portal>
8990
<div ref={colorRef} style={colorPickerWrapperStyle}>
9091
<PaletteColorPicker
9192
width={250}
@@ -97,8 +98,8 @@ const ColorPicker = ({
9798
dark
9899
/>
99100
</div>
100-
)}
101-
</Portal>
101+
</Portal>
102+
)}
102103
</div>
103104
);
104105
};
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,24 @@ import React, {
55
useRef,
66
useState,
77
} from 'react';
8-
import Select from './Select';
9-
import SelectItem from './Select/SelectItem';
10-
import TextInput from './Inputs/TextInput';
11-
import Icon from './Icon';
12-
import FileInput from './Inputs/FileInput';
13-
import Divider from './Divider';
14-
import Accordion from './Accordion';
15-
import Canvas from './Canvas';
16-
import ColorPicker from './ColorPicker';
17-
import InputRange from './Inputs/RangeInput';
18-
import Header from './Layout/Header';
8+
import Select from '../Select';
9+
import SelectItem from '../Select/SelectItem';
10+
import TextInput from '../Inputs/TextInput';
11+
import Icon from '../Icon';
12+
import FileInput from '../Inputs/FileInput';
13+
import Divider from '../Divider';
14+
import Accordion from '../Accordion';
15+
import Canvas from '../Canvas';
16+
import ColorPicker from '../ColorPicker';
17+
import InputRange from '../Inputs/RangeInput';
18+
import Header from '../Layout/Header';
1919
import {
2020
fontFamilies,
2121
fontSizes,
2222
imageTypes,
2323
strokeTypes,
2424
} from '@constants/select';
25-
import { CanvasState } from '../types/canvas';
25+
import { CanvasState } from '../../types/canvas';
2626
import {
2727
fill,
2828
font,
@@ -33,10 +33,10 @@ import {
3333
alignEnd,
3434
} from '@assets/icons';
3535
import { Color, useColor } from 'react-color-palette';
36-
import { BodyWrapper, ContentWrapper, InnerWrapper } from './Layout/styled';
36+
import { BodyWrapper, ContentWrapper, InnerWrapper } from '../Layout/styled';
3737
import * as S from './TG.styled';
3838
import { downloadCanvas, getValidMessage, ValidType } from '@utils/common';
39-
import { IconButton } from './Icon/styled';
39+
import { IconButton } from '../Icon/styled';
4040

4141
interface TGProps {
4242
additionalFontFamily?: string[];

src/lib/ThumbnailGenerator.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import React, { useState } from 'react';
2-
import TG from '@components/TG';
3-
import { TGOpenButton } from '@components/TG.styled';
42
import { toggleButton } from '@assets/icons';
53
import { Position, getIconSize } from '@utils/style';
64
import { Portal } from '@devgrace/react';
75
import Icon from '@components/Icon';
86
import { Global } from '@emotion/react';
97
import reset from '@css/reset';
8+
import TG from '@components/TG';
9+
import { TGOpenButton } from '@components/TG/TG.styled';
1010

1111
interface ThumbnailGeneratorProps {
1212
isDefaultOpen?: boolean;

0 commit comments

Comments
 (0)