question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Implementing borders style props support

See original GitHub issue

https://react-figma.now.sh/docs/styling.html

Props:

  • borderColor

  • borderTopColor

  • borderRightColor

  • borderBottomColor

  • borderLeftColor

  • borderWidth

  • borderTopWidth

  • borderRightWidth

  • borderBottomWidth

  • borderLeftWidth

react-figma already has transformBorderStyleProperties function.

Can be used Figma API (GeometryMixin):

strokes: ReadonlyArray<Paint>

and Yoga Layout:

setBorder(edge: YogaEdge, borderWidth: number): void;

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ilyalesikcommented, Nov 12, 2019

There is a much more suitable place - src/yoga/applyStyleToYogaNode.ts. 🙂 You can add something like

    if (style.borderWidth) {
        yogaNode.setBorder(yoga.EDGE_ALL, style.borderWidth);
    }

to applyStyleToYogaNode function.

1reaction
ilyalesikcommented, Nov 12, 2019

Yes, indeed, I did not notice it. I think, we can just implementing borderColor, borderWidth only.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Learn To Create Border Style in React Native - eduCBA
Guide to React-Native Border Style. Here we discuss how we can create Border Style in React Native with Syntax and Examples.
Read more >
border - CSS: Cascading Style Sheets - MDN Web Docs
The border shorthand CSS property sets an element's border. It sets the values of border-width, border-style, and border-color.
Read more >
CSS Borders - W3Schools
The CSS border properties allow you to specify the style, width, and color of an ... The border-style property specifies what kind of...
Read more >
css - React Inline Style: How would I refactor this border style?
I'm setting the color through props because it's a dynamic component that can change colors to almost anything. <div className="policy" style={{ ...
Read more >
Style Props | Amplify UI for React
These style props are available on Amplify UI primitive components and can be used to modify the corresponding styles. This allows users to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found