Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More UI customization #41

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

More UI customization #41

wants to merge 3 commits into from

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


background: var(--background);
display: flex;
justify-content: center;
width: var(--character-width);
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

--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 🔪


display: flex;
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