diff --git a/editor/src/components/canvas/commands/delete-properties-command.ts b/editor/src/components/canvas/commands/delete-properties-command.ts index 8ad9a3bb145f..66959673561d 100644 --- a/editor/src/components/canvas/commands/delete-properties-command.ts +++ b/editor/src/components/canvas/commands/delete-properties-command.ts @@ -16,7 +16,6 @@ import type { BaseCommand, CommandFunctionResult, WhenToRun } from './commands' import * as EP from '../../../core/shared/element-path' import * as PP from '../../../core/shared/property-path' import { patchParseSuccessAtElementPath } from './patch-utils' -import type { InteractionLifecycle } from '../canvas-strategies/canvas-strategy-types' import { mapDropNulls } from '../../../core/shared/array-utils' import { applyValuesAtPath } from './adjust-number-command' @@ -102,10 +101,10 @@ export const runDeleteProperties = ( command.properties, ) - const propertiesToUnsetPatch = getPropertiesToUnsetPatches(editorState, command) + const propertiesToUnsetPatches = getPropertiesToUnsetPatches(editorState, command) return { - editorStatePatches: [propertyUpdatePatch, ...propertiesToUnsetPatch], + editorStatePatches: [propertyUpdatePatch, ...propertiesToUnsetPatches], commandDescription: `Delete Properties ${command.properties .map(PP.toString) .join(',')} on ${EP.toUid(command.element)}`, diff --git a/editor/src/components/canvas/plugins/tailwind-style-plugin.ts b/editor/src/components/canvas/plugins/tailwind-style-plugin.ts index 46a100e4ca4f..13473902f205 100644 --- a/editor/src/components/canvas/plugins/tailwind-style-plugin.ts +++ b/editor/src/components/canvas/plugins/tailwind-style-plugin.ts @@ -152,14 +152,20 @@ export const TailwindPlugin = (config: Config | null): StylePlugin => ({ return [ deleteProperties( - 'always', + 'on-complete', elementPath, Object.keys(TailwindPropertyMapping).map((prop) => PP.create('style', prop)), ), - updateClassListCommand('always', elementPath, [ - ...stylePropConversions.map(({ property, value }) => UCL.add({ property, value })), - ...getRemoveUpdates(editorState.canvas.propertiesToUnset), - ]), + updateClassListCommand( + 'always', + elementPath, + stylePropConversions.map(({ property, value }) => UCL.add({ property, value })), + ), + updateClassListCommand( + 'always', + elementPath, + getRemoveUpdates(editorState.canvas.propertiesToUnset), + ), ] }) if (commands.length === 0) {