-
-
Notifications
You must be signed in to change notification settings - Fork 160
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(button): Add Custom Icons for Custom Buttons (#62) #69
Conversation
97c8dee
to
b963246
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this! I made a few comments but nothing blocking!
src/components/App/App.js
Outdated
</div> | ||
); | ||
function App() { | ||
library.add(fab, fas, far); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be hoisted outside of the function? I don' think it matters though since app shouldn't re-render
src/components/Home/Home.js
Outdated
@@ -88,6 +92,7 @@ function Home(props) { | |||
color: textColors[i]?.trim(), | |||
}} | |||
alt={altTexts[i]?.trim()} | |||
icon={icons[i]?.trim()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be
icon={icons && icons[i]?.trim()}
That way you don't have to have the if statement and null check above and then assign to []
? Not a big deal, just a recommendation.
I am totally fine with merging too, just wanted to throw that out there. LMK! |
b963246
to
0feeafe
Compare
I've updated the PR with your recommendations 馃槂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!
Proposed Changes
CUSTOM_BUTTON_ICON
in the ENV file:CUSTOM_BUTTON_ICON=fas link,fab youtube
all icons
only one
without icon
Checklist
yarn ci
to test my code