Skip to content

Commit

Permalink
feat: custom data-cy and classname props (#725)
Browse files Browse the repository at this point in the history
  • Loading branch information
nataliepina authored May 25, 2022
1 parent 691cc6a commit 31797be
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/styleUtils/layout/container/components/Container.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
import * as React from "react";
import { cx } from "@emotion/css";
import { container } from "../style";

export interface ContainerProps {
children: React.ReactNode;
"data-cy"?: string;
className?: string;
}

const Container: React.FC<ContainerProps> = ({ children }) => (
<div className={container} data-cy="container">
const Container = ({
children,
"data-cy": dataCy = "container",
className
}: ContainerProps) => (
<div className={cx(container, className)} data-cy={dataCy}>
{children}
</div>
);
Expand Down

0 comments on commit 31797be

Please sign in to comment.