@arwes/react-frames
Version:
Futuristic Sci-Fi UI Web Framework
30 lines (29 loc) • 965 B
JavaScript
import React, { useMemo } from 'react';
import { cx } from '@arwes/tools';
import { memo } from '@arwes/react-tools';
import { createFrameKranoxSettings } from '@arwes/frames';
import { FrameBase } from '../FrameBase/index.js';
const FrameKranox = memo((props) => {
const { styled, animated, padding, strokeWidth, bgStrokeWidth, squareSize, smallLineLength, largeLineLength } = props;
const settings = useMemo(() => createFrameKranoxSettings({
styled,
animated,
padding,
strokeWidth,
bgStrokeWidth,
squareSize,
smallLineLength,
largeLineLength
}), [
styled,
animated,
padding,
strokeWidth,
bgStrokeWidth,
squareSize,
smallLineLength,
largeLineLength
]);
return (React.createElement(FrameBase, { ...props, className: cx('arwes-frames-framekranox', props.className), settings: settings }));
});
export { FrameKranox };