diff --git a/samples/weather-forecast/.babelrc b/samples/weather-forecast/.babelrc index ee17415..1780f56 100644 --- a/samples/weather-forecast/.babelrc +++ b/samples/weather-forecast/.babelrc @@ -5,6 +5,7 @@ { "useBuiltIns": "usage", "corejs": 3, + "targets": "> 0.25%, not dead, not ie < 11" } ], "@babel/preset-react", diff --git a/samples/weather-forecast/.eslintrc.js b/samples/weather-forecast/.eslintrc.js index a521634..26b9490 100644 --- a/samples/weather-forecast/.eslintrc.js +++ b/samples/weather-forecast/.eslintrc.js @@ -5,7 +5,7 @@ module.exports = { extends: [ "eslint:recommended", "plugin:@typescript-eslint/recommended", - "plugin:prettier/recommended" + "prettier" ], rules: { "no-unused-vars": "off", diff --git a/samples/weather-forecast/README.md b/samples/weather-forecast/README.md index 4381503..e68c018 100644 --- a/samples/weather-forecast/README.md +++ b/samples/weather-forecast/README.md @@ -22,4 +22,4 @@ $ yarn install ## Building the form for configuration -This project uses [react-jsonschema-form](https://rjsf-team.github.io/react-jsonschema-form/) for configuring the widget properties. For more information consult their [documentation](https://react-jsonschema-form.readthedocs.io/en/latest/) +This project uses [react-jsonschema-form](https://rjsf-team.github.io/react-jsonschema-form/) for configuring the widget properties. For more information consult their [documentation](https://rjsf-team.github.io/react-jsonschema-form/docs/) diff --git a/samples/weather-forecast/dev/bootstrap.ts b/samples/weather-forecast/dev/bootstrap.ts index 4daefc1..19e6f45 100644 --- a/samples/weather-forecast/dev/bootstrap.ts +++ b/samples/weather-forecast/dev/bootstrap.ts @@ -55,7 +55,7 @@ class FakeBaseClass extends window.HTMLElement implements BaseBlock { } public parseConfig>( - attributes: T + attributes: T, ): Record { return prepareAttributes(attributes); } @@ -69,14 +69,14 @@ window.defineBlock = function (externalBlockDefinition) { const customElementName = externalBlockDefinition.blockDefinition.name; const CustomElementClass = externalBlockDefinition.blockDefinition.factory( FakeBaseClass, - WidgetApiMock + WidgetApiMock, ); - window.customElements.define(customElementName, CustomElementClass); ReactDOM.render( React.createElement(Config, { blockDefinition: externalBlockDefinition.blockDefinition, }), - document.getElementById("config") + document.getElementById("config"), ); + window.customElements.define(customElementName, CustomElementClass); }; diff --git a/samples/weather-forecast/dev/config.tsx b/samples/weather-forecast/dev/config.tsx index a98d185..4a72ccb 100644 --- a/samples/weather-forecast/dev/config.tsx +++ b/samples/weather-forecast/dev/config.tsx @@ -41,12 +41,11 @@ const Config: FC = ({ blockDefinition }) => { aria-label={blockDefinition.label} style={{ background: "rgb(247, 247, 247)", - cursor: "pointer", height: "96px", flex: "0 0 20%", borderRadius: "3px", padding: "0px", - margin: "0px", + margin: "5px 0px 0px 0px", display: "flex", alignItems: "center", justifyContent: "center", @@ -57,6 +56,7 @@ const Config: FC = ({ blockDefinition }) => { height="28" src={blockDefinition.iconUrl} style={{ maxWidth: "80px" }} + alt={blockDefinition.label} />