Setup Ant.design
Summary: allow-large-files This makes the Ant.design component library available to Flipper The CSS setup is unconventional, in the sense that the normal way to do this is to use a webpack loader to dynamically load the right less files, and a babel transform to automatically import the style sheets. Since we use Metro, which is not very suitable for transforming non-JS(like) files, I figured that the simplest thing is to pre-compile the entire less theme. Which should be fine since we shouldn't be changing the less files very often, and since we don't ship a website, it is probably not too bad to have the full ANT theme for now in there, even though we don't use all components. It is 600 K of css. In the next diff the CSS is loaded conditionally, only if Sandy is enabled. If the CSS turns out to be too big we can optimise this later to only import CSS for components we use by doing some Metro magic, but it doesn't seem to be trivial (that is, I couldn't get in to work in < 2 hours). Reviewed By: cekkaewnumchai Differential Revision: D23625855 fbshipit-source-id: 3ba810b2221dc0c7b719f66310e590c7748cf239
This commit is contained in:
committed by
Facebook GitHub Bot
parent
16a640b7ee
commit
908a8bab1e
4
desktop/themes/light.less
Normal file
4
desktop/themes/light.less
Normal file
@@ -0,0 +1,4 @@
|
||||
@import '../node_modules/antd/lib/style/themes/default.less';
|
||||
@import '../node_modules/antd/dist/antd.less';
|
||||
|
||||
@primary-color: red;
|
||||
Reference in New Issue
Block a user