Created
May 13, 2021 10:36
-
-
Save antoniojps/84f3b81a84d2dca4a6f78a7a097f4bf0 to your computer and use it in GitHub Desktop.
Component boilerplate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import Component from "."; | |
export default { | |
title: "atoms/Component" | |
}; | |
export const Basic = () => <Component />; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
export interface ComponentProps {} | |
export const Component = (props: ComponentProps) => { | |
return <div>Hello component</div>; | |
}; | |
export default Component; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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