Registering IconButton with Icon Component

Anyone know how to register this IconButton with a icon component?

  aria-label='Search database'
  icon={<SearchIcon />}

Hi, are you trying to register a general version of IconButton and running in some issue by making icon a component?

Yes ideally.

I can however place the icon (as appose to an attribute) as a child which seems to work in Chakra UI: