From 1d89a41c7678d19b04c831def9066bc886ee9ba1 Mon Sep 17 00:00:00 2001 From: kiennguyen Date: Fri, 7 Aug 2020 17:44:12 +0700 Subject: [PATCH] allows isMobile props to be used --- src/BasicLayout.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/BasicLayout.tsx b/src/BasicLayout.tsx index cd0a293a..092bdb04 100644 --- a/src/BasicLayout.tsx +++ b/src/BasicLayout.tsx @@ -267,7 +267,9 @@ const BasicLayout: React.FC = (props) => { } const isMobile = - (colSize === 'sm' || colSize === 'xs') && !props.disableMobile; + rest.isMobile !== undefined && typeof rest.isMobile === 'boolean' + ? rest.isMobile + : (colSize === 'sm' || colSize === 'xs') && !props.disableMobile; const { breadcrumb = {}, breadcrumbMap, menuData = [] } = !menuDataRender ? menuInfoData