UNPKG

@cerberus-design/styled-system

Version:

Cerberus Design System Panda-CSS styled-system.

14 lines (10 loc) 498 B
import { createElement, forwardRef } from 'react' import { splitProps } from '../helpers.mjs'; import { getSquareStyle } from '../patterns/square.mjs'; import { cerberus } from './factory.mjs'; export const Square = /* @__PURE__ */ forwardRef(function Square(props, ref) { const [patternProps, restProps] = splitProps(props, ["size"]) const styleProps = getSquareStyle(patternProps) const mergedProps = { ref, ...styleProps, ...restProps } return createElement(cerberus.div, mergedProps) })