From 25f543226fac44cc20e4b3083f4b975d21e7a9e8 Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 8 Nov 2019 16:24:53 +0800 Subject: [PATCH] fix: maxColumnsPerRow is not required --- src/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 150d779..ee1e737 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -5,7 +5,7 @@ import Column, { FooterColumn } from './column'; export interface FooterProps { prefixCls?: string; bottom?: React.ReactNode; - maxColumnsPerRow: number; + maxColumnsPerRow?: number; columns?: FooterColumn[]; theme?: 'dark' | 'light'; className?: string; @@ -62,7 +62,7 @@ const Footer: React.FC = ({ ) => { const styleObject = { ...columnStyle } as React.CSSProperties; if (shouldWrap) { - styleObject.flex = `0 0 ${100 / (maxColumnsPerRow + 1) + + styleObject.flex = `0 0 ${100 / (maxColumnsPerRow! + 1) + 0.1}%`; } return (