diff --git a/examples/react-nextjs/app/components/TestCustomButton.cy.tsx b/examples/react-nextjs/app/components/TestCustomButton.cy.tsx index 8093f5d6..0eb394ff 100644 --- a/examples/react-nextjs/app/components/TestCustomButton.cy.tsx +++ b/examples/react-nextjs/app/components/TestCustomButton.cy.tsx @@ -1,21 +1,20 @@ -import React from 'react'; -import TestCustomButton from './TestCustomButton'; +import TestCustomButton from './TestCustomButton' describe('', () => { it('renders', () => { - cy.mount(); + cy.mount() - cy.get('button').should('have.text', 'Launch with Custom Component'); + cy.get('button').should('have.text', 'Launch with Custom Component') // Wait for script to become interactive. This is almost instananeous locally but takes time in CI. - cy.wait(1250); + cy.wait(1250) // Launch the Connector - cy.get('iframe#quiltt--frame').should('not.exist'); - cy.get('button').click(); - cy.get('iframe#quiltt--frame').should('be.visible'); + cy.get('iframe#quiltt--frame').should('not.exist') + cy.get('button').click() + cy.get('iframe#quiltt--frame').should('be.visible') // TODO: Check that iframe is rendered. https://github.com/cypress-io/cypress/issues/136 // cy.get('iframe#quiltt--frame').should('contains.text', 'Stitching finance together') - }); -}); + }) +}) diff --git a/examples/react-nextjs/app/components/TestCustomButton.tsx b/examples/react-nextjs/app/components/TestCustomButton.tsx index 924201d5..cc2e131d 100644 --- a/examples/react-nextjs/app/components/TestCustomButton.tsx +++ b/examples/react-nextjs/app/components/TestCustomButton.tsx @@ -1,11 +1,15 @@ 'use client' +import type { ButtonHTMLAttributes } from 'react' + import { QuilttButton } from '@quiltt/react' -const CustomButton = ({ children, ...props }: any) => { +type CustomButtonProps = ButtonHTMLAttributes + +const CustomButton = ({ children, ...props }: CustomButtonProps) => { return ( diff --git a/examples/react-nextjs/app/components/TestQuilttButton.cy.tsx b/examples/react-nextjs/app/components/TestQuilttButton.cy.tsx index 3cfa75f2..ea0a0b2c 100644 --- a/examples/react-nextjs/app/components/TestQuilttButton.cy.tsx +++ b/examples/react-nextjs/app/components/TestQuilttButton.cy.tsx @@ -1,21 +1,20 @@ -import React from 'react'; -import TestQuilttButton from './TestQuilttButton'; +import TestQuilttButton from './TestQuilttButton' describe('', () => { it('renders', () => { - cy.mount(); + cy.mount() - cy.get('button').should('have.text', 'Launch with Component'); + cy.get('button').should('have.text', 'Launch with Component') // Wait for script to become interactive. This is almost instananeous locally but takes time in CI. - cy.wait(1250); + cy.wait(1250) // Launch the Connector - cy.get('iframe#quiltt--frame').should('not.exist'); - cy.get('button').click(); - cy.get('iframe#quiltt--frame').should('be.visible'); + cy.get('iframe#quiltt--frame').should('not.exist') + cy.get('button').click() + cy.get('iframe#quiltt--frame').should('be.visible') // TODO: Check that iframe is rendered. https://github.com/cypress-io/cypress/issues/136 // cy.get('iframe#quiltt--frame').should('contains.text', 'Stitching finance together') - }); -}); + }) +}) diff --git a/examples/react-nextjs/app/components/TestQuilttButton.tsx b/examples/react-nextjs/app/components/TestQuilttButton.tsx index a786316b..fc1f23bf 100644 --- a/examples/react-nextjs/app/components/TestQuilttButton.tsx +++ b/examples/react-nextjs/app/components/TestQuilttButton.tsx @@ -6,7 +6,7 @@ export const TestQuilttButton = () => { return ( Launch with Component diff --git a/examples/react-nextjs/app/components/TestQuilttContainer.cy.tsx b/examples/react-nextjs/app/components/TestQuilttContainer.cy.tsx index 64c3bae0..00aeef6e 100644 --- a/examples/react-nextjs/app/components/TestQuilttContainer.cy.tsx +++ b/examples/react-nextjs/app/components/TestQuilttContainer.cy.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { TestQuilttContainer } from './TestQuilttContainer' describe('', () => { diff --git a/examples/react-nextjs/app/components/TestQuilttContainer.tsx b/examples/react-nextjs/app/components/TestQuilttContainer.tsx index f7ce2048..55f9bb2f 100644 --- a/examples/react-nextjs/app/components/TestQuilttContainer.tsx +++ b/examples/react-nextjs/app/components/TestQuilttContainer.tsx @@ -6,7 +6,7 @@ export const TestQuilttContainer = () => { return ( ) } diff --git a/examples/react-nextjs/app/page.tsx b/examples/react-nextjs/app/page.tsx index a0569959..adb903d5 100644 --- a/examples/react-nextjs/app/page.tsx +++ b/examples/react-nextjs/app/page.tsx @@ -11,16 +11,16 @@ import { export default function Home() { return ( -
+
-

Modal launchers

+

Modal launchers

-
-

Container

+
+

Container

diff --git a/examples/react-nextjs/package.json b/examples/react-nextjs/package.json index fbad1fdc..8c956ed0 100644 --- a/examples/react-nextjs/package.json +++ b/examples/react-nextjs/package.json @@ -12,7 +12,7 @@ "cypress:install": "cypress install", "cypress:open": "cypress open", "dev": "next dev", - "lint": "TIMING=1 biome check src/ --fix", + "lint": "TIMING=1 biome check app/ --fix", "start": "next start", "test": "pnpm run cypress:component", "typecheck": "tsc --project tsconfig.json --noEmit"