You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/js/samples/inline-style-optimized/expected.js

60 lines
961 B

/* generated by Svelte vX.Y.Z */
import {
SvelteComponent as SvelteComponent_1,
detach,
element,
init,
insert,
noop,
safe_not_equal,
set_style
} from "svelte/internal";
function create_fragment(ctx) {
var div;
return {
c() {
div = element("div");
set_style(div, "color", ctx.color);
},
m(target, anchor) {
insert(target, div, anchor);
},
p(changed, ctx) {
if (changed.color) {
set_style(div, "color", ctx.color);
}
},
i: noop,
o: noop,
d(detaching) {
if (detaching) {
detach(div);
}
}
};
}
function instance($$self, $$props, $$invalidate) {
let { color } = $$props;
$$self.$set = $$props => {
if ('color' in $$props) $$invalidate('color', color = $$props.color);
};
return { color };
}
class SvelteComponent extends SvelteComponent_1 {
constructor(options) {
super();
init(this, options, instance, create_fragment, safe_not_equal, ["color"]);
}
}
export default SvelteComponent;