@chakra-ui/react#IconProps TypeScript Examples

The following examples show how to use @chakra-ui/react#IconProps. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Logo.tsx    From coindrop with GNU General Public License v3.0 6 votes vote down vote up
PiggyLogo: FC<IconProps> = (iconProps) => {
    const theme = useTheme();
    const { colorMode } = useColorMode();
    const logoOutlineColor = useColorModeValue(theme.colors.gray['800'], theme.colors.gray['900']);
    // eslint-disable-next-line react/jsx-props-no-spreading
    return colorMode === 'light'
        ? <PiggyLogoIcon color={logoOutlineColor} {...iconProps} />
        : <PiggyLogoIconDarkMode color={logoOutlineColor} {...iconProps} />;
}
Example #2
Source File: paymentMethods.tsx    From coindrop with GNU General Public License v3.0 5 votes vote down vote up
paymentMethodIcons: { [id: string]: ComponentWithAs<"svg", IconProps> } = paymentMethods.reduce((result, item) => {
    // eslint-disable-next-line no-param-reassign
    result[item.id] = item.icon;
    return result;
}, {})