Skip to content

Commit

Permalink
fix: changed styles to style
Browse files Browse the repository at this point in the history
  • Loading branch information
Renato Pozzi committed Jan 10, 2022
1 parent 8a4c2d8 commit cc1c27f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Plock.js
Expand Up @@ -2,7 +2,7 @@ import * as React from "react";

const uuid = () => Math.random().toString(36).substring(2, 12);

export function Plock({ children, className, styles, nColumns = 3, gap = 10 }) {
export function Plock({ children, className, style, nColumns = 3, gap = 10 }) {
const [columns, setColumns] = React.useState(() => {
return Array.from({ length: nColumns }, (e) => []);
});
Expand Down Expand Up @@ -40,7 +40,7 @@ export function Plock({ children, className, styles, nColumns = 3, gap = 10 }) {
<div
data-testid="plock-container"
className={className}
style={{ styles, ...defaultStyles.mainGrid }}
style={{ style, ...defaultStyles.mainGrid }}
>
{columns.map((column, index) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/Plock.test.js
Expand Up @@ -105,7 +105,7 @@ it("should be possible to customize the styles of the main container using style
});

it("should not override the default styles", () => {
render(<Plock styles={{ display: "flex" }} />);
render(<Plock style={{ display: "flex" }} />);

const element = screen.getByTestId("plock-container");
expect(element).toHaveStyle({ display: "grid" });
Expand Down

0 comments on commit cc1c27f

Please sign in to comment.