fix rotation on state arrow
This commit is contained in:
parent
e410748bed
commit
5795a78cd5
|
@ -58,14 +58,14 @@
|
|||
onChanged(e.target.value);
|
||||
}} />
|
||||
<button on:click={() => (isOpen = !isOpen)}>
|
||||
<span
|
||||
<div
|
||||
class="icon"
|
||||
style={`
|
||||
transform: rotate(${isOpen ? 180 : -90}deg);
|
||||
color: ${bindingPath ? 'rgba(0, 85, 255, 0.8)' : 'inherit'}
|
||||
transform: rotate(${isOpen ? 0 : 90}deg);
|
||||
color: ${bindingPath ? 'rgba(0, 85, 255, 0.8);' : 'inherit;'}
|
||||
`}>
|
||||
<ArrowDownIcon size={36} />
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
{#if isOpen}
|
||||
|
|
|
@ -9,6 +9,7 @@ const screen1 = require("../appPackages/testApp/pages/main/screens/screen1.json"
|
|||
const screen2 = require("../appPackages/testApp/pages/main/screens/screen2.json")
|
||||
const { readJSON, pathExists, unlink, readFile } = require("fs-extra")
|
||||
const { getHashedCssPaths } = require("../utilities/builder/convertCssToFiles")
|
||||
const listScreens = require("../utilities/builder/listScreens");
|
||||
|
||||
const app = require("./testApp")()
|
||||
testComponents.textbox.name = `./customComponents/textbox`
|
||||
|
@ -217,3 +218,35 @@ it("/savePage should prepare all necessary client files", async () => {
|
|||
expect(savedScreen2Css).toEqual(screen2Css)
|
||||
expect(indexHtmlMain.includes(screen2CssPaths.url)).toBe(true)
|
||||
})
|
||||
|
||||
it("builds the correct stateOrigins object from a screen definition with no handlers", () => {
|
||||
expect(listScreens.buildStateOrigins(screen1)).toEqual({});
|
||||
});
|
||||
|
||||
it("builds the correct stateOrigins object from a screen definition with handlers", () => {
|
||||
expect(listScreens.buildStateOrigins({
|
||||
"name": "screen1",
|
||||
"description": "",
|
||||
"props": {
|
||||
"_component": "@budibase/standard-components/div",
|
||||
"className": "",
|
||||
"onClick": [
|
||||
{
|
||||
"##eventHandlerType": "Set State",
|
||||
"parameters": {
|
||||
"path": "testKey",
|
||||
"value": "value"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
})).toEqual({
|
||||
"testKey": {
|
||||
"##eventHandlerType": "Set State",
|
||||
"parameters": {
|
||||
"path": "testKey",
|
||||
"value": "value"
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue