Comments (8)
Since you're passing a string it will continue to work the same after the changes go out for v1.0.0. Your feedback along with 2 others convinced me we should change the default functionality in the final release, so thanks!
from materialdesign-react.
@Templarian thanks, I am going to check it out. I will probably using your package in production at my new job, just in few minutes I am going to discuss about some proposal and among many others there will be this package.
Ahah I was like cause it was what I was looking for and it was just created, I putted like the fifth star on GitHub.
Thanks for sharing your software and for your passion, I hope you can find useful some packages I shared or at least I will try to contribute with feedbacks and maybe PRs.
Have a nice day,
Gianluca.
from materialdesign-react.
@fibo We make the assumption that most users use a base rem size of 16px
. 16
* 1.5
= 24px
the native 1:1 size for people on older screens this should look best.
You can also pass a string to the size
. So you could put any value you want. size={'1.5em'}
for example.
Hopefully that reasoning makes sense. It's mostly to accommodate 95% of users, but allows the 5% to use a string.
from materialdesign-react.
So in your wrapper, simply put size={`${size}rem`}
, is what I mean.
from materialdesign-react.
Chatting with the team about this, we're going to remove the default setting of 1 and make it unset.
Small breaking change for existing users, but probably best to handle this in CSS.
from materialdesign-react.
Okay, we've decided to bundle this breaking change into v1.0.0
along side the release of <Stack/>
component that will be bundled with <Icon/>
.
from materialdesign-react.
Thanks for the answer and support, I also opted for passing a string.
from materialdesign-react.
@fibo By the way v1.0.0
released with this change (and lots of other updates). 😺
from materialdesign-react.
Related Issues (20)
- How do you dynamically load an Icon? HOT 14
- Invariant Violation HOT 8
- Icon prop types do not allow assignment of onClick HOT 4
- Icon is using deprecated SFC type instead of FunctionComponent type HOT 1
- [Feature request] Add default class attribute to all svg elements HOT 2
- Dynamic load icons HOT 1
- Why '--save-dev'? HOT 1
- Icon path prop not accepting strings? HOT 1
- Incremented `id` doesn't play nicely w/ SSR HOT 9
- Add 'prop-types' as a dependency (or remove it) HOT 4
- Baseline flag HOT 1
- Change/Disabled role in svg icon HOT 1
- `spin` broken in Safari HOT 5
- Build error HOT 8
- Cannot assign to read only property 'width' of object '#<Object>' icon HOT 1
- add a view-box prop HOT 1
- Can't use 'onClick' on Icon in Typescript HOT 1
- Different styles of icons (rounded, sharp, outlined)
- Does this library still need to be maintained?
- Default import of Icon crushes production build HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from materialdesign-react.