-
Notifications
You must be signed in to change notification settings - Fork 125
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
Is there any option to set icon size by default globally #40
Comments
For backwards compatibility this library could use a import { FeatherContext, Camera, Clock, Compass } from "react-feather"
const App = () => (
<>
<Camera /> {/* color currentColor, size 24px */}
<FeatherContext.Provider
value={{
size: "1em",
color: "maroon",
}}
>
<Clock /> {/* color maroon, size 1em */}
<Compass size={32} /> {/* color maroon, size 32px */}
</FeatherContext.Provider>
</>
) |
@fdev I noticed that the size attribute does not modify the viewBox size, which is fixed to be |
@jiayinghsu I've since switched to react-icons which includes feather icons, defaults to |
This is an ongoing issue, and it really frustrates me that I cannot change the size of the icon using the attribute. |
I think it is possible to change the icon's // icon.js
import * as icons from 'react-feather'
Object.values(icons).forEach((icon) => {
icon.defaultProps = {
size: '1em',
}
})
export * from 'react-feather' import { Home } from "./icon" |
How can i set icon size from 24 to some other size by default
The text was updated successfully, but these errors were encountered: