UNPKG

@arwes/react-frames

Version:

Futuristic Sci-Fi UI Web Framework

25 lines (24 loc) 1.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FrameHeader = void 0; const tslib_1 = require("tslib"); const react_1 = tslib_1.__importStar(require("react")); const tools_1 = require("@arwes/tools"); const react_tools_1 = require("@arwes/react-tools"); const frames_1 = require("@arwes/frames"); const index_js_1 = require("../FrameBase/index.js"); const FrameHeader = (0, react_tools_1.memo)((props) => { const { styled, animated, padding, strokeWidth, decoWidth, direction, align, contentLength } = props; const settings = (0, react_1.useMemo)(() => (0, frames_1.createFrameHeaderSettings)({ styled, animated, padding, strokeWidth, decoWidth, direction, align, contentLength }), [styled, animated, padding, strokeWidth, decoWidth, direction, align, contentLength]); return (react_1.default.createElement(index_js_1.FrameBase, { ...props, className: (0, tools_1.cx)('arwes-frames-frameheader', props.className), settings: settings })); }); exports.FrameHeader = FrameHeader;