-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
21 additions
and
21 deletions.
There are no files selected for viewing
22 changes: 11 additions & 11 deletions
22
opentrons-ai-client/src/components/Button/__tests__/Button.test.tsx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import { render, screen } from "@testing-library/react"; | ||
import { describe, it, expect } from "vitest"; | ||
import { render, screen } from '@testing-library/react' | ||
import { describe, it, expect } from 'vitest' | ||
|
||
import { Button } from "../index"; | ||
import { Button } from '../index' | ||
|
||
describe("Button", () => { | ||
it("renders with the provided label", () => { | ||
const label = "Click me!"; | ||
render(<Button label={label} />); | ||
const buttonElement = screen.getByText(label); | ||
expect(buttonElement).toBeInTheDocument(); | ||
}); | ||
}); | ||
describe('Button', () => { | ||
it('renders with the provided label', () => { | ||
const label = 'Click me!' | ||
render(<Button label={label} />) | ||
const buttonElement = screen.getByText(label) | ||
expect(buttonElement).toBeInTheDocument() | ||
}) | ||
}) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
export interface ButtonProps { | ||
label: string; | ||
label: string | ||
} | ||
|
||
export const Button = ({ label }: ButtonProps) => { | ||
return <button style={{ fontSize: "2rem" }}>{label}</button>; | ||
}; | ||
return <button style={{ fontSize: '2rem' }}>{label}</button> | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import React from "react"; | ||
import React from 'react' | ||
|
||
import ReactDOM from "react-dom/client"; | ||
import ReactDOM from 'react-dom/client' | ||
|
||
import App from "./App.tsx"; | ||
import "./index.css"; | ||
import App from './App.tsx' | ||
import './index.css' | ||
|
||
ReactDOM.createRoot(document.getElementById("root")!).render( | ||
ReactDOM.createRoot(document.getElementById('root')!).render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode>, | ||
); | ||
</React.StrictMode> | ||
) |