plugin updates

This commit is contained in:
Tony Volpe
2024-06-17 15:33:26 -04:00
parent 3751a5a1a6
commit e4e274a9a7
2674 changed files with 0 additions and 507851 deletions

View File

@@ -1,6 +0,0 @@
import { styled } from '@linaria/react';
export default styled.img`
height: ${props => (props.height ? props.height : 'auto')};
width: ${props => (props.width ? props.width : 'auto')};
`;

View File

@@ -1,51 +0,0 @@
import React from 'react';
import { SelectControl } from '@wordpress/components';
import withMetaData from '../../utils/withMetaData';
import {
useBackgroundAppContext,
usePostBackgroundMessage,
} from '../../iframe/useBackgroundApp';
import { ProxyMessages } from '../../iframe/integratedMessages';
interface IOption {
label: string;
value: string;
disabled?: boolean;
}
interface IUISidebarSelectControlProps {
metaValue?: string;
metaKey: string;
setMetaValue?: Function;
options: IOption[];
className: string;
label: JSX.Element;
}
const UISidebarSelectControl = (props: IUISidebarSelectControlProps) => {
const isBackgroundAppReady = useBackgroundAppContext();
const monitorSidebarMetaChange = usePostBackgroundMessage();
return (
<SelectControl
value={props.metaValue}
onChange={content => {
if (props.setMetaValue) {
props.setMetaValue(content);
}
isBackgroundAppReady &&
monitorSidebarMetaChange({
key: ProxyMessages.TrackSidebarMetaChange,
payload: {
metaKey: props.metaKey,
},
});
}}
{...props}
/>
);
};
export default withMetaData(UISidebarSelectControl);