fix(blocks-loaders): Remove LogoSpinner.

This commit is contained in:
Gervwyk 2022-03-03 15:07:41 +02:00
parent c4cc37acff
commit 3af64aacaf
5 changed files with 0 additions and 206 deletions

View File

@ -1,51 +0,0 @@
/*
Copyright 2020-2021 Lowdefy, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import React from 'react';
const LogoSpinner = ({ color, barColor }) => (
<svg width="100%" height="100%" viewBox="0 0 94 91" version="1.1">
<g>
<path
d="M94,18.634c0,-10.284 -8.35,-18.634 -18.634,-18.634l-56.732,0c-10.284,0 -18.634,8.35 -18.634,18.634l0,53.732c0,10.284 8.35,18.634 18.634,18.634l56.732,0c10.284,0 18.634,-8.35 18.634,-18.634l0,-53.732Z"
style={{ fill: color || '#bfbfbf' }}
/>
<rect
className="loading-bar"
x={16}
y={15}
width={30}
height={59}
style={{ fill: barColor || '#f1f1f1' }}
/>
<rect
className="loading-bar-sm"
x={53}
y={52}
width={25}
height={25}
style={{ fill: barColor || '#f1f1f1' }}
/>
</g>
</svg>
);
LogoSpinner.meta = {
icons: [],
styles: [],
};
export default LogoSpinner;

View File

@ -1,89 +0,0 @@
/*
Copyright 2020-2021 Lowdefy, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import React from 'react';
import LogoSpinner from './LogoSpinner.js';
import { render } from '@testing-library/react';
test('default', () => {
const { container } = render(<LogoSpinner />);
expect(container.firstChild).toMatchInlineSnapshot(`
<svg
height="100%"
version="1.1"
viewBox="0 0 94 91"
width="100%"
>
<g>
<path
d="M94,18.634c0,-10.284 -8.35,-18.634 -18.634,-18.634l-56.732,0c-10.284,0 -18.634,8.35 -18.634,18.634l0,53.732c0,10.284 8.35,18.634 18.634,18.634l56.732,0c10.284,0 18.634,-8.35 18.634,-18.634l0,-53.732Z"
style="fill: #bfbfbf;"
/>
<rect
class="loading-bar"
height="59"
style="fill: #f1f1f1;"
width="30"
x="16"
y="15"
/>
<rect
class="loading-bar-sm"
height="25"
style="fill: #f1f1f1;"
width="25"
x="53"
y="52"
/>
</g>
</svg>
`);
});
test('color props', () => {
const { container } = render(<LogoSpinner color="red" barColor="green" />);
expect(container.firstChild).toMatchInlineSnapshot(`
<svg
height="100%"
version="1.1"
viewBox="0 0 94 91"
width="100%"
>
<g>
<path
d="M94,18.634c0,-10.284 -8.35,-18.634 -18.634,-18.634l-56.732,0c-10.284,0 -18.634,8.35 -18.634,18.634l0,53.732c0,10.284 8.35,18.634 18.634,18.634l56.732,0c10.284,0 18.634,-8.35 18.634,-18.634l0,-53.732Z"
style="fill: red;"
/>
<rect
class="loading-bar"
height="59"
style="fill: green;"
width="30"
x="16"
y="15"
/>
<rect
class="loading-bar-sm"
height="25"
style="fill: green;"
width="25"
x="53"
y="52"
/>
</g>
</svg>
`);
});

View File

@ -1,17 +0,0 @@
# Copyright 2020-2021 Lowdefy, Inc
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- id: default
type: LogoSpinner
description: Default

View File

@ -1,43 +0,0 @@
/*
Copyright 2020-2021 Lowdefy, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
.loading-bar {
animation: loading-bar-morph 0.5s linear alternate 0s infinite;
transform-origin: bottom;
}
@keyframes loading-bar-morph {
0% {
transform: scaleY(0.6);
}
100% {
transform: scaleY(0.95) translateY(5%);
}
}
.loading-bar-sm {
animation: loading-bar-morph-sm 0.5s linear alternate 0s infinite;
transform-origin: bottom;
}
@keyframes loading-bar-morph-sm {
0% {
transform: scaleY(1.4) translateY(5%);
}
100% {
transform: scaleY(0.9);
}
}

View File

@ -17,8 +17,6 @@
import React from 'react';
import { blockDefaultProps } from '@lowdefy/block-utils';
import LogoSpinner from '../LogoSpinner/LogoSpinner.js';
const Spinner = ({ properties, methods }) => {
return (
<div
@ -31,10 +29,6 @@ const Spinner = ({ properties, methods }) => {
})}
>
<div style={{ width: properties.size || 50, margin: 'auto', height: properties.size || 50 }}>
<LogoSpinner
color={properties.color}
barColor={properties.barColor || (properties.shaded === true ? '#f1f1f1' : '#fff')}
/>
<div
className={methods.makeCssClass({
textAlign: 'center',