linter formatting

This commit is contained in:
Conor_Mack 2020-05-26 10:19:04 +01:00
parent a9ef48e4ea
commit cff58f6a2d
7 changed files with 29 additions and 35 deletions

View File

@ -40,4 +40,3 @@ const apply_class = (id, name = "element", styles, selector) => {
return `.${name}-${id}${sel} {\n${styles}\n}` return `.${name}-${id}${sel} {\n${styles}\n}`
} }
} }

View File

@ -40,10 +40,10 @@
styles = styles styles = styles
} }
$: stylesheetLinks = pipe( $: stylesheetLinks = pipe($store.pages.stylesheets, [
$store.pages.stylesheets, map(s => `<link rel="stylesheet" href="${s}"/>`),
[map(s => `<link rel="stylesheet" href="${s}"/>`), join("\n")] join("\n"),
) ])
$: screensExist = $: screensExist =
$store.currentPreviewItem._screens && $store.currentPreviewItem._screens &&

View File

@ -16,15 +16,12 @@
const joinPath = join("/") const joinPath = join("/")
const normalizedName = name => const normalizedName = name =>
pipe( pipe(name, [
name,
[
trimCharsStart("./"), trimCharsStart("./"),
trimCharsStart("~/"), trimCharsStart("~/"),
trimCharsStart("../"), trimCharsStart("../"),
trimChars(" "), trimChars(" "),
] ])
)
const lastPartOfName = c => { const lastPartOfName = c => {
if (!c) return "" if (!c) return ""
@ -34,10 +31,10 @@
const isComponentSelected = (current, comp) => current === comp const isComponentSelected = (current, comp) => current === comp
$: _screens = pipe( $: _screens = pipe(screens, [
screens, map(c => ({ component: c, title: lastPartOfName(c) })),
[map(c => ({ component: c, title: lastPartOfName(c) })), sortBy("title")] sortBy("title"),
) ])
const confirmDeleteComponent = component => { const confirmDeleteComponent = component => {
componentToDelete = component componentToDelete = component

View File

@ -22,11 +22,7 @@
const capitalise = s => s.substring(0, 1).toUpperCase() + s.substring(1) const capitalise = s => s.substring(0, 1).toUpperCase() + s.substring(1)
const get_name = s => (!s ? "" : last(s.split("/"))) const get_name = s => (!s ? "" : last(s.split("/")))
const get_capitalised_name = name => const get_capitalised_name = name => pipe(name, [get_name, capitalise])
pipe(
name,
[get_name, capitalise]
)
const moveDownComponent = component => { const moveDownComponent = component => {
const c = component const c = component

View File

@ -130,8 +130,10 @@ export const border = [
{ label: "Radius", key: "border-radius", control: Input }, { label: "Radius", key: "border-radius", control: Input },
{ label: "Width", key: "border-width", control: Input }, //custom { label: "Width", key: "border-width", control: Input }, //custom
{ {
label: "Color", key: "border-color", control: OptionSelect, label: "Color",
options: ["black", "white", "red", "blue", "green"] key: "border-color",
control: OptionSelect,
options: ["black", "white", "red", "blue", "green"],
}, },
{ label: "Style", key: "border-style", control: Input }, { label: "Style", key: "border-style", control: Input },
] ]

View File

@ -169,7 +169,7 @@ export default {
icon: "ri-file-list-line", icon: "ri-file-list-line",
properties: { properties: {
design: { ...all }, design: { ...all },
settings: [] settings: [],
}, },
}, },
], ],
@ -182,7 +182,7 @@ export default {
children: [], children: [],
properties: { properties: {
design: { design: {
...all ...all,
}, },
settings: [ settings: [
{ label: "Text", key: "text", control: Input }, { label: "Text", key: "text", control: Input },
@ -192,7 +192,7 @@ export default {
valueKey: "checked", valueKey: "checked",
control: Checkbox, control: Checkbox,
}, },
] ],
}, },
}, },
{ {