Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(icons): ✨ add new icon & createIcon component #69

Draft
wants to merge 2 commits into
base: ariakit-system
Choose a base branch
from

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.

2 participants