Skip to content

Commit

Permalink
🐛 full width issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jagnani73 committed Jul 8, 2021
1 parent d449baa commit d8db724
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-easy-marquee",
"version": "1.1.3",
"version": "1.1.4",
"homepage": "https://jagnani73.github.io/react-easy-marquee",
"description": "A marquee component for React using CSS.",
"author": {
Expand Down
18 changes: 15 additions & 3 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,33 @@ const Marquee = ({
style={{
display: "flex",
overflow: "hidden",
alignItems: "center",
position: "relative",
backgroundColor: background || "transparent",
height: height || "5rem",
width: width || "100%",
}}
>
{offsetValues.map((offset) => (
<div key={offset}>
<section
key={offset}
style={{
whiteSpace: "nowrap",
overflow: "hidden",
position: "absolute",
alignItems: "center",
display: "flex",
minWidth: "100%",
minHeight: "100%",
}}
>
<Animation reverse={reverse} offset={offset} axis={axis} />

<div
style={{
width: "100%",
height: "100%",
position: "absolute",
whiteSpace: "nowrap",
display: "flex",
overflow: "hidden",
justifyContent: "space-around",
Expand All @@ -65,7 +77,7 @@ const Marquee = ({
>
{children}
</div>
</div>
</section>
))}
</div>
);
Expand Down

0 comments on commit d8db724

Please sign in to comment.