diff --git a/packages/plugin-r3f/src/components/Toolbar/Toolbar.tsx b/packages/plugin-r3f/src/components/Toolbar/Toolbar.tsx index b1e2d9c..47a08d5 100644 --- a/packages/plugin-r3f/src/components/Toolbar/Toolbar.tsx +++ b/packages/plugin-r3f/src/components/Toolbar/Toolbar.tsx @@ -2,13 +2,16 @@ import type {VFC} from 'react' import React from 'react' import {useEditorStore} from '../../store' import shallow from 'zustand/shallow' -import {GiPocketBow, IoCameraOutline} from 'react-icons/all' +import {GiPocketBow, IoCameraOutline, RiFocus3Line} from 'react-icons/all' import {Vector3} from 'three' import type {$FixMe} from '@theatre/shared/utils/types' import studio, {ToolbarIconButton} from '@theatre/studio' import {getSelected} from '../useSelected' import {usePrism, useVal} from '@theatre/dataverse-react' import styled from 'styled-components' +import TransformControlsModeSelect from './TransformControlsModeSelect' +import ViewportShadingSelect from './ViewportShadingSelect' +import TransformControlsSpaceSelect from './TransformControlsSpaceSelect' const ToolGroup = styled.div` pointer-events: auto; @@ -44,7 +47,7 @@ const Toolbar: VFC = () => { label="Create snapshot" /> - {/* + @@ -75,7 +78,7 @@ const Toolbar: VFC = () => { /> - } onClick={() => { @@ -99,7 +102,7 @@ const Toolbar: VFC = () => { } }} /> - */} + void + onChange: (value: string) => void } const TransformControlsModeSelect: VFC = ({ value, onChange, -}) => ( - , - }, - { - option: 'rotate', - label: 'Tool: Rotate', - icon: , - }, - { - option: 'scale', - label: 'Tool: Scale', - icon: , - }, - ]} - /> -) +}) => { + return ( + , + }, + { + value: 'rotate', + label: 'Tool: Rotate', + icon: , + }, + { + value: 'scale', + label: 'Tool: Scale', + icon: , + }, + ]} + /> + ) +} export default TransformControlsModeSelect diff --git a/packages/plugin-r3f/src/components/Toolbar/utils/CompactModeSelect.tsx b/packages/plugin-r3f/src/components/Toolbar/utils/CompactModeSelect.tsx index f696f13..2635023 100644 --- a/packages/plugin-r3f/src/components/Toolbar/utils/CompactModeSelect.tsx +++ b/packages/plugin-r3f/src/components/Toolbar/utils/CompactModeSelect.tsx @@ -55,6 +55,8 @@ function OptionButton