Skip to content

Instantly share code, notes, and snippets.

@antoniojps
Created May 13, 2021 10:36
Show Gist options
  • Save antoniojps/84f3b81a84d2dca4a6f78a7a097f4bf0 to your computer and use it in GitHub Desktop.
Save antoniojps/84f3b81a84d2dca4a6f78a7a097f4bf0 to your computer and use it in GitHub Desktop.
Component boilerplate
import React from "react";
import { render } from "@testing-library/react";
import Component from ".";
describe("Component", () => {
it("should render successfully", () => {
const { baseElement } = render(<Component />);
expect(baseElement).toBeTruthy();
});
});
import React from "react";
import Component from ".";
export default {
title: "atoms/Component"
};
export const Basic = () => <Component />;
import React from "react";
export interface ComponentProps {}
export const Component = (props: ComponentProps) => {
return <div>Hello component</div>;
};
export default Component;
import styled from "styled-components";
export const ComponentContainer = styled.div``;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment