mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-12-03 05:45:55 +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" />
41 lines
1003 B
TypeScript
41 lines
1003 B
TypeScript
import type { PresetStyle, WsComponentMeta } from "@webstudio-is/sdk";
|
|
import { hr } from "@webstudio-is/sdk/normalize.css";
|
|
import { props } from "./__generated__/separator.props";
|
|
import type { defaultTag } from "./separator";
|
|
|
|
const presetStyle = {
|
|
hr: [
|
|
...hr,
|
|
{
|
|
property: "height",
|
|
value: { type: "keyword", value: "1px" },
|
|
},
|
|
{
|
|
property: "background-color",
|
|
value: { type: "keyword", value: "gray" },
|
|
},
|
|
{
|
|
property: "border-top-style",
|
|
value: { type: "keyword", value: "none" },
|
|
},
|
|
{
|
|
property: "border-right-style",
|
|
value: { type: "keyword", value: "none" },
|
|
},
|
|
{
|
|
property: "border-left-style",
|
|
value: { type: "keyword", value: "none" },
|
|
},
|
|
{
|
|
property: "border-bottom-style",
|
|
value: { type: "keyword", value: "none" },
|
|
},
|
|
],
|
|
} satisfies PresetStyle<typeof defaultTag>;
|
|
|
|
export const meta: WsComponentMeta = {
|
|
presetStyle,
|
|
initialProps: ["id", "class"],
|
|
props,
|
|
};
|