Skip to content

Conversation

@timshaww
Copy link

Updates:

  • Added border radius customization via props
  • Added margin spacing between characters via props
  • Added font customization for the characters via props
  • Updated the demo to include all options

@timshaww
Copy link
Author

timshaww commented Apr 23, 2024 via email

Copy link
Owner

@robonyong robonyong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, I have some concerns/preferences that I'd like addressed before pulling this in

padding: 0.5em;
position: relative;
border-radius: var(--border-radius);
margin-right: var(--margin);
Copy link
Owner

@robonyong robonyong Apr 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it is I think this overlaps in function a bit with border-width. I understand why you'd want to break the character spacing away from border-width, so two requests:

  1. consider renaming this prop to something more descriptive like characterSpacing, css variable name --character-spacing
  2. Implement this on the wrapper level instead (https://github.com/robonyong/react-split-flap-display/blob/master/src/SplitFlapDisplay/styles.module.scss#L13) and replace the border-left with margin-left and your css variable

--color: #ddd;
--font-family: Arial, sans-serif; // Variable for font family
--font-size: 1rem;
--padding: 10px;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this type of overall padding is best left to the parent container of this component, and not imposed by the library. please 🔪

color: var(--color);
font-size: var(--font-size);
font-family: var(--font-family); // Apply font family
padding: var(--padding);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants