This is an automated email from the ASF dual-hosted git repository. yjc pushed a commit to branch home-screen-mvp in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
commit 40d2acf37f64481122f069c87ab0aa6216b3506b Author: Evan Rusackas <[email protected]> AuthorDate: Fri Oct 2 16:48:55 2020 -0700 Adding Expand Icon to Collapse component --- .../src/views/CRUD/welcome/Welcome.tsx | 27 ++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/superset-frontend/src/views/CRUD/welcome/Welcome.tsx b/superset-frontend/src/views/CRUD/welcome/Welcome.tsx index 1cd6db9..f4f1e7d 100644 --- a/superset-frontend/src/views/CRUD/welcome/Welcome.tsx +++ b/superset-frontend/src/views/CRUD/welcome/Welcome.tsx @@ -28,6 +28,7 @@ import ActivityTable from './ActivityTable'; import ChartTable from './ChartTable'; import SavedQueries from './SavedQueries'; import DashboardTable from './DashboardTable'; +import Icon from 'src/components/Icon'; const { Panel } = Collapse; @@ -93,8 +94,20 @@ export default function Welcome({ user }: WelcomeProps) { '', ); console.log('user', user); + + + function ExpandIcon(): React.ReactNode { + return ( + <Icon name="caret-right" /> + ) + } + return ( - <Collapse defaultActiveKey={['1']}> + <Collapse + defaultActiveKey={['1']} + expandIcon={ExpandIcon} + ghost + > <Panel header={t('Recents')} key="1"> <SubMenu activeChild={activityFilter} @@ -159,7 +172,9 @@ export default function Welcome({ user }: WelcomeProps) { { name: 'View All', buttonStyle: 'link', - onClick: () => { window.location = '/dashboard/list/'} + onClick: () => { + window.location = '/dashboard/list/'; + }, }, ]} /> @@ -212,7 +227,9 @@ export default function Welcome({ user }: WelcomeProps) { { name: 'View All', buttonStyle: 'link', - onClick: () => { window.location = 'superset/sqllab#search'} + onClick: () => { + window.location = 'superset/sqllab#search'; + }, }, ]} /> @@ -252,7 +269,9 @@ export default function Welcome({ user }: WelcomeProps) { { name: 'View All', buttonStyle: 'link', - onClick: () => { window.location = '/chart/list'} + onClick: () => { + window.location = '/chart/list'; + }, }, ]} />
