Skip to content

Commit

Permalink
Set import paths correctly for PCUI React (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
willeastcott authored Dec 19, 2023
1 parent d95b130 commit 6ac3444
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/ui/components/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
SliderInput,
VectorInput,
NumericInput
} from 'pcui';
} from '@playcanvas/pcui/react';
import { Option } from '../../types';

export const Detail = (props: { label: string, value:string|number}) => {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/errors.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { InfoBox } from 'pcui';
import { InfoBox } from '@playcanvas/pcui/react';
import { ObserverData } from '../types';

// InfoBox that shows an error
Expand Down
2 changes: 1 addition & 1 deletion src/ui/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Observer } from '@playcanvas/observer';
import React from 'react';
import ReactDOM from 'react-dom';
import { Container, Spinner } from 'pcui';
import { Container, Spinner } from '@playcanvas/pcui/react';

import { getAssetPath } from '../helpers';
import { ObserverData } from '../types';
Expand Down
2 changes: 1 addition & 1 deletion src/ui/left-panel/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Panel, Container, TreeViewItem, TreeView } from 'pcui';
import { Panel, Container, TreeViewItem, TreeView } from '@playcanvas/pcui/react';
import { HierarchyNode, SetProperty, ObserverData } from '../../types';

import { Detail, Select, Toggle, Vector } from '../components';
Expand Down
2 changes: 1 addition & 1 deletion src/ui/left-panel/morph-target-panel.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import VisibilitySensor from 'react-visibility-sensor';
import { MorphTargetData, SetProperty, ObserverData } from '../../types';
import { Panel } from 'pcui';
import { Panel } from '@playcanvas/pcui/react';
import { MorphSlider } from '../components';

class MorphTargetPanel extends React.Component <{ morphs: ObserverData['morphs'], progress: number, setProperty: SetProperty }> {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/load-controls.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useRef, useState } from 'react';
import { Container, Label, Button, TextInput } from 'pcui';
import { Container, Label, Button, TextInput } from '@playcanvas/pcui/react';
import { getAssetPath } from '../helpers';

import { File, SetProperty } from '../types';
Expand Down
2 changes: 1 addition & 1 deletion src/ui/popup-panel/animation-controls.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Button } from 'pcui';
import { Button } from '@playcanvas/pcui/react';
import { SetProperty, ObserverData } from '../../types';

import { NakedSelect, NakedSlider } from '../components';
Expand Down
3 changes: 1 addition & 2 deletions src/ui/popup-panel/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { Observer } from '@playcanvas/observer';
import { Button } from 'pcui';
import { Button } from '@playcanvas/pcui/react';
import { SetProperty, ObserverData } from '../../types';
import AnimationControls from './animation-controls';
import { CameraPanel, SkyboxPanel, LightPanel, DebugPanel, ViewPanel } from './panels';
Expand Down
2 changes: 1 addition & 1 deletion src/ui/popup-panel/panels.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Container, Button, Label, TextInput } from 'pcui';
import { Container, Button, Label, TextInput } from '@playcanvas/pcui/react';
import { SetProperty, ObserverData } from '../../types';
import { extract } from '../../helpers';
// @ts-ignore no type defs included
Expand Down
2 changes: 1 addition & 1 deletion src/ui/selected-node.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Container } from 'pcui';
import { Container } from '@playcanvas/pcui/react';
import { SetProperty, ObserverData } from '../types';

import { Vector, Detail } from './components';
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"noEmit": true,
"baseUrl": ".",
"paths": {
"pcui": ["node_modules/@playcanvas/pcui"],
"playcanvas-extras": ["node_modules/playcanvas/build/playcanvas-extras.mjs"]
}
},
Expand Down

0 comments on commit 6ac3444

Please sign in to comment.