@arwes/react-frames
Version:
Futuristic Sci-Fi UI Web Framework
36 lines (35 loc) • 1.1 kB
JavaScript
import React, { useMemo } from 'react';
import { cx } from '@arwes/tools';
import { memo } from '@arwes/react-tools';
import { createFrameNefrexSettings } from '@arwes/frames';
import { FrameBase } from '../FrameBase/index.js';
const FrameNefrex = memo((props) => {
const { styled, animated, padding, leftTop, leftBottom, rightTop, rightBottom, squareSize, strokeWidth, smallLineLength, largeLineLength } = props;
const settings = useMemo(() => createFrameNefrexSettings({
styled,
animated,
padding,
leftTop,
leftBottom,
rightTop,
rightBottom,
squareSize,
strokeWidth,
smallLineLength,
largeLineLength
}), [
styled,
animated,
padding,
leftTop,
leftBottom,
rightTop,
rightBottom,
squareSize,
strokeWidth,
smallLineLength,
largeLineLength
]);
return (React.createElement(FrameBase, { ...props, className: cx('arwes-frames-framenefrex', props.className), settings: settings }));
});
export { FrameNefrex };