mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 23:16:21 +00:00
feat: add builders club catalog ui flow
This commit is contained in:
+6
-4
@@ -24,6 +24,8 @@ export interface BaseProps<T = HTMLElement> extends DetailedHTMLProps<HTMLAttrib
|
||||
export const Base: FC<BaseProps<HTMLDivElement>> = props =>
|
||||
{
|
||||
const { ref = null, innerRef = null, display = null, fit = false, fitV = false, grow = false, shrink = false, fullWidth = false, fullHeight = false, overflow = null, position = null, float = null, pointer = false, visible = null, textColor = null, classNames = [], className = '', style = {}, children = null, ...rest } = props;
|
||||
const safeClassNames = Array.isArray(classNames) ? classNames : [];
|
||||
const safeClassName = (typeof className === 'string') ? className : '';
|
||||
|
||||
const getClassNames = useMemo(() =>
|
||||
{
|
||||
@@ -53,19 +55,19 @@ export const Base: FC<BaseProps<HTMLDivElement>> = props =>
|
||||
|
||||
if(textColor) newClassNames.push('text-' + textColor);
|
||||
|
||||
if(classNames.length) newClassNames.push(...classNames);
|
||||
if(safeClassNames.length) newClassNames.push(...safeClassNames);
|
||||
|
||||
return newClassNames;
|
||||
}, [ display, fit, fitV, grow, shrink, fullWidth, fullHeight, overflow, position, float, pointer, visible, textColor, classNames ]);
|
||||
}, [ display, fit, fitV, grow, shrink, fullWidth, fullHeight, overflow, position, float, pointer, visible, textColor, safeClassNames ]);
|
||||
|
||||
const getClassName = useMemo(() =>
|
||||
{
|
||||
let newClassName = getClassNames.join(' ');
|
||||
|
||||
if(className.length) newClassName += (' ' + className);
|
||||
if(safeClassName.length) newClassName += (' ' + safeClassName);
|
||||
|
||||
return newClassName.trim();
|
||||
}, [ getClassNames, className ]);
|
||||
}, [ getClassNames, safeClassName ]);
|
||||
|
||||
const getStyle = useMemo(() =>
|
||||
{
|
||||
|
||||
@@ -15,9 +15,7 @@ interface NitroCardHeaderViewProps extends ColumnProps
|
||||
|
||||
export const NitroCardHeaderView: FC<NitroCardHeaderViewProps> = props =>
|
||||
{
|
||||
const { headerText = null, isGalleryPhoto = false, noCloseButton = false, isInfoToHabboPages = false, onReportPhoto = null, onClickInfoHabboPages = null, onCloseClick = null, justifyContent = 'center', alignItems = 'center', classNames = [], children = null, ...rest } = props;
|
||||
|
||||
|
||||
const { headerText = null, isGalleryPhoto = false, noCloseButton = false, isInfoToHabboPages = false, onReportPhoto = null, onClickInfoHabboPages = null, onCloseClick = null, justifyContent = 'center', alignItems = 'center', classNames = [], className = '', children = null, ...rest } = props;
|
||||
|
||||
const onMouseDown = (event: MouseEvent<HTMLDivElement>) =>
|
||||
{
|
||||
@@ -26,7 +24,11 @@ export const NitroCardHeaderView: FC<NitroCardHeaderViewProps> = props =>
|
||||
};
|
||||
|
||||
return (
|
||||
<Column center className={ 'nitro-card-header-shell relative flex items-center justify-center flex-col drag-handler min-h-card-header max-h-card-header' } { ...rest }>
|
||||
<Column
|
||||
center
|
||||
classNames={ [ 'nitro-card-header-shell', 'relative', 'flex', 'items-center', 'justify-center', 'flex-col', 'drag-handler', 'min-h-card-header', 'max-h-card-header', ...classNames ] }
|
||||
className={ className }
|
||||
{ ...rest }>
|
||||
<Flex center fullWidth>
|
||||
<span className="nitro-card-title text-white">{ headerText }</span>
|
||||
{ isGalleryPhoto &&
|
||||
|
||||
Reference in New Issue
Block a user