Skip to content

feat: Additional way to reset in spacing #4924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@ import {
Popover,
PopoverTrigger,
PopoverContent,
Flex,
theme,
} from "@webstudio-is/design-system";
import type { StyleProperty, StyleValue } from "@webstudio-is/css-engine";
import { propertyDescriptions } from "@webstudio-is/css-data";
import {
CssValueInput,
type IntermediateStyleValue,
} from "../../shared/css-value-input";
import { createBatchUpdate } from "../../shared/use-style-data";
import { theme } from "@webstudio-is/design-system";
import type { StyleValueSourceColor } from "~/shared/style-object-model";
import { $availableUnitVariables } from "../../shared/model";
import type { Modifiers } from "../../shared/modifier-keys";
import { PropertyLabel } from "../../property-label";
import { humanizeString } from "~/shared/string-utils";

const slideUpAndFade = keyframes({
"0%": { opacity: 0, transform: "scale(0.8)" },
Expand Down Expand Up @@ -120,9 +124,10 @@ const Input = ({
const Trigger = styled("div", { position: "absolute", width: 0, height: 0 });

const PopoverContentStyled = styled(PopoverContent, {
flexDirection: "row",
gap: theme.spacing[5],
minWidth: 0,
minHeight: 0,
width: theme.spacing[20],
border: `1px solid ${theme.colors.borderMain}`,
borderRadius: theme.borderRadius[7],
background: theme.colors.backgroundPanel,
Expand Down Expand Up @@ -166,13 +171,20 @@ export const InputPopover = ({
// and closing popover before applying changes
onClick={(event) => event.stopPropagation()}
>
<Input
styleSource={styleSource}
value={value}
property={property}
getActiveProperties={getActiveProperties}
onClosePopover={onClose}
<PropertyLabel
label={humanizeString(property)}
description={propertyDescriptions[property]}
properties={[property]}
/>
<Flex css={{ width: theme.spacing[20] }}>
<Input
styleSource={styleSource}
value={value}
property={property}
getActiveProperties={getActiveProperties}
onClosePopover={onClose}
/>
</Flex>
</PopoverContentStyled>
</Popover>
);
Expand Down