diff --git a/ui/block-components/src/ActionBar/ActionBar.tsx b/ui/block-components/src/ActionBar/ActionBar.tsx index 3eebe175a..8d4da4bab 100644 --- a/ui/block-components/src/ActionBar/ActionBar.tsx +++ b/ui/block-components/src/ActionBar/ActionBar.tsx @@ -2,7 +2,7 @@ import React, { FunctionComponent, MouseEvent } from 'react'; import styled from '@emotion/styled'; import { Theme } from 'theme-ui'; -const Container = styled.div(({ theme }: { theme: Theme }) => ({ +const Container = styled.div(({ theme }: { theme?: Theme }) => ({ bottom: 0, right: 0, maxWidth: '100%', diff --git a/ui/blocks-core/src/ControlsTable/PropEditorRow.tsx b/ui/blocks-core/src/ControlsTable/PropEditorRow.tsx deleted file mode 100644 index 73971135a..000000000 --- a/ui/blocks-core/src/ControlsTable/PropEditorRow.tsx +++ /dev/null @@ -1,74 +0,0 @@ -/** @jsx jsx */ -/* eslint react/jsx-key: 0 */ -import { jsx } from 'theme-ui'; - -import React from 'react'; -import { Flex } from 'theme-ui'; -import { - SetControlValueFn, - ClickControlFn, -} from '@component-controls/specification'; -import styled from '@emotion/styled'; -import { LoadedComponentControl } from '@component-controls/core'; -import { getPropertyEditor, PropertyEditor } from './node_modules/@component-controls/editors'; - -const StyledTR = styled.tr<{}>(({ theme }) => ({ - //@ts-ignore - ...theme?.styles?.tr, -})); - -const StyledTD = styled.td<{}>(({ theme }) => ({ - //@ts-ignore - ...theme?.styles?.td, -})); - -const InvalidType = () => Invalid Type; - -interface PropertyEditorRowProps { - prop: LoadedComponentControl; - name: string; - storyId?: string; - setControlValue?: SetControlValueFn; - clickControl?: ClickControlFn; -} - -export const PropertyEditorRow: React.FunctionComponent = ({ - prop, - name, - setControlValue, - clickControl, - storyId, -}) => { - const InputType: PropertyEditor = getPropertyEditor(prop.type) || InvalidType; - const onChange = (propName: string, value: any) => { - if (setControlValue && storyId) { - setControlValue(storyId, propName, value); - } - }; - const onClick = () => { - if (clickControl && storyId) { - clickControl(storyId, name); - } - }; - return ( - - {!prop.hideLabel ? prop.label || name : null} - - - - - - - ); -}; diff --git a/ui/blocks-core/tsconfig.json b/ui/blocks-core/tsconfig.json deleted file mode 100644 index bae5b192b..000000000 --- a/ui/blocks-core/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "module": "esnext", - "outDir": "../block-components/dist", - "rootDir": "../block-components/src", - "declaration": true, - "types": ["node", "jest"], - "typeRoots": ["../../node_modules/@types", "../block-components/node_modules/@types"] - }, - "include": ["../block-components/src/**/*", "../block-components/src/typings.d.ts"], - "exclude": ["../block-components/node_modules/**"] -} \ No newline at end of file