import styles from './divider.module.scss'; import { Component, mergeProps } from 'solid-js'; interface DividerProps { direction?: 'horizontal' | 'vertical'; minWidth?: string; } export const Divider: Component = (props) => { props = mergeProps({ direction: 'horizontal' as DividerProps['direction'] }, props); function getRealMinWidth(direction: DividerProps['direction'], minWidth: DividerProps['minWidth']) { if (direction === 'horizontal') { return { ['min-width']: minWidth }; } else { return { ['min-height']: minWidth ?? '0' }; } } return
; }