Skip to content

Conversation

@navin-moorthy
Copy link
Contributor

No description provided.

@Karthik-B-06
Copy link
Collaborator

Karthik-B-06 commented Aug 3, 2022

This implementation seems good.
But one small thing, the Icon components should be resizeable right? In my previous implementation, I had Wrapped the SVG Component with a Component, and set the height & width of the SVG component to "100%". So I will resize the Icon by setting a height/width to Box Component.

    <Box
      ref={ref}
      style={[tailwind.style(sizer), style, { aspectRatio: iconAspectRatio }]}
    >
      {/* @ts-ignore */}
      {React.cloneElement(icon, { fill: color })}
    </Box>

where sizer is

  const sizer = size ? `w-[${size}px]` : "";

@Karthik-B-06 Karthik-B-06 marked this pull request as draft November 16, 2022 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants