bernaferrari / FigmaToCode

Generate responsive pages and apps on HTML, Tailwind, Flutter and SwiftUI.
https://www.figma.com/community/plugin/842128343887142055
GNU General Public License v3.0
3.79k stars 300 forks source link

react-native / react-figma / react-primitives supporting #11

Open ilyalesik opened 4 years ago

ilyalesik commented 4 years ago

Proposal: react-native / react-figma / react-primitives supporting

The react-primitives family has several universal interfaces:

bernaferrari commented 4 years ago

My biggest issue is that I don't know react native. How do I make rectangles, flex, etc in it? If you are willing to help, we can do it. It is not hard, there are just too many details.

ilyalesik commented 4 years ago

Sure, I'm very interested. I already made a little demo, the proof-of-concept of how it can works. I think that your plugin is most advanced right now, so extending them looks most reasonable.

bernaferrari commented 4 years ago

I can make a branch with a wrong conversion and you can point everything that's wrong, what do you think?

On Sat, Nov 21, 2020, 07:51 Ilya Lesik notifications@github.com wrote:

Sure, I'm very interested. I already made a little demo https://github.com/react-figma/code-generator, the proof-of-concept of how it can works. I think that your plugin is most advanced right now, so extending them looks most reasonable.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bernaferrari/FigmaToCode/issues/11#issuecomment-731562271, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACVXFJRXLAYT2CKR5VCVZLSQ6LRRANCNFSM4T4TWBQQ .

ilyalesik commented 4 years ago

@bernaferrari, it's a great idea! You can start a branch; I'll look at the result and start correcting.

bernaferrari commented 3 years ago

I have added HTML support to the main branch. Do you think it is something that can replace <div> with <View> or should it be treated as a whole new language?

ilyalesik commented 3 years ago

@bernaferrari also styles supporting needed. React Native doesn't support CSS classes; there are their own styles instead: https://reactnative.dev/docs/style.

bernaferrari commented 3 years ago

Is there no inline styling? Should we export the layer as a component?

ilyalesik commented 3 years ago

React Native supports inline styling

bernaferrari commented 3 years ago

So, the difference is just div -> View and p to Text? I support JSX already.

DaleWebb commented 2 years ago

So, the difference is just div -> View and p to Text? I support JSX already.

Yes, that's effectively it. Another thing to consider is that the View layout only supports flexbox-like layouts. I think your implementation already relies on flexbox, so this probably won't be an issue