mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-12-03 22:02:25 +09:00
Ref https://github.com/webstudio-is/webstudio/issues/3632 Now states are always inferred from tags. User action states work for all tags. <img width="233" alt="Screenshot 2025-05-22 at 19 27 18" src="https://github.com/user-attachments/assets/f0dc6a07-8a01-4878-950e-61b6e489da7a" />
23 lines
665 B
TypeScript
23 lines
665 B
TypeScript
import { CheckboxCheckedIcon } from "@webstudio-is/icons/svg";
|
|
import type { WsComponentMeta, PresetStyle } from "@webstudio-is/sdk";
|
|
import { checkbox } from "@webstudio-is/sdk/normalize.css";
|
|
import type { defaultTag } from "./checkbox";
|
|
import { props } from "./__generated__/checkbox.props";
|
|
|
|
const presetStyle = {
|
|
input: [
|
|
...checkbox,
|
|
{
|
|
property: "margin-right",
|
|
value: { type: "unit", unit: "em", value: 0.5 },
|
|
},
|
|
],
|
|
} satisfies PresetStyle<typeof defaultTag>;
|
|
|
|
export const meta: WsComponentMeta = {
|
|
icon: CheckboxCheckedIcon,
|
|
presetStyle,
|
|
initialProps: ["id", "class", "name", "value", "required", "checked"],
|
|
props,
|
|
};
|