UNPKG

@arwes/react-frames

Version:

Futuristic Sci-Fi UI Web Framework

22 lines (21 loc) 893 B
import React, { useMemo } from 'react'; import { cx } from '@arwes/tools'; import { memo } from '@arwes/react-tools'; import { createFrameOctagonSettings } from '@arwes/frames'; import { FrameBase } from '../FrameBase/index.js'; const FrameOctagon = memo((props) => { const { styled, animated, padding, leftTop, rightTop, rightBottom, leftBottom, squareSize, strokeWidth } = props; const settings = useMemo(() => createFrameOctagonSettings({ styled, animated, padding, leftTop, rightTop, rightBottom, leftBottom, squareSize, strokeWidth }), [styled, animated, padding, leftTop, rightTop, rightBottom, leftBottom, squareSize, strokeWidth]); return (React.createElement(FrameBase, { ...props, className: cx('arwes-frames-frameoctagon', props.className), settings: settings })); }); export { FrameOctagon };