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

README.md file should be updated for how to use the packege #310

Open
tarekibnkhayer opened this issue Nov 10, 2023 · 2 comments
Open

README.md file should be updated for how to use the packege #310

tarekibnkhayer opened this issue Nov 10, 2023 · 2 comments

Comments

@tarekibnkhayer
Copy link

Most npm packege has the section of Usage in the home page .But i don't find here the section which might be a bit of user unfriendly.

@janie314
Copy link

What about a simple example like the following? This would demonstrate how to use the key CSS properties.

Slider.tsx

import ReactSlider from "react-slider";
import "./Slider.css";

function Slider() {
  return (
    <ReactSlider
      className="horizontal-slider"
      thumbClassName="thumb"
      trackClassName="track"
    />
  );
}

export { Slider };

Slider.css

.horizontal-slider {
  width: 100%;
  max-width: 20ch;
  padding-left: 0.5%;
  padding-right: 0.5%;
}

.thumb {
  cursor: pointer;
  background: black;
  border: 10px solid black;
  border-radius: 100%;
  transform: translate(0,-50%);
  display: block;
}

.track {
  background: black;
  height: 5px;
  transform: translate(0,-50%);
  z-index: 50;
}

@tarekibnkhayer
Copy link
Author

Yeah, I think that would be nice.

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

No branches or pull requests

2 participants