Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat Create Callout Component for Careers page #95

Closed
wants to merge 12 commits into from
2 changes: 1 addition & 1 deletion apps/website-25/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
10 changes: 10 additions & 0 deletions apps/website-25/src/components/careers/CareerCallout.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { render } from '@testing-library/react';
import { describe, expect, test } from 'vitest';
import Callout from './CareersCallout';

describe('Callout', () => {
test('renders default as expected', () => {
const { container } = render(<Callout />);
expect(container).toMatchSnapshot();
});
});
27 changes: 27 additions & 0 deletions apps/website-25/src/components/careers/CareersCallout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react';

const Callout: React.FC = () => {
const title = 'Join us in our mission to ensure humanity safely navigates the transition to transformative AI.';
const ctaLabel = 'View our careers';
const ctaLink = '/careers';

return (
<div className="callout bg-[radial-gradient(ellipse_at_30%,_#fff_0%,_#6687ff_100%)] rounded-lg py-16 px-8 m-8 flex flex-col items-center">
<h2 className="callout__title mb-4 text-center">{title}</h2>
<button
type="button"
className="callout__cta bg-bluedot-normal text-white rounded-lg px-4 py-2 font-semibold text-base hover:bg-bluedot-darker flex items-center"
onClick={() => window.open(ctaLink, '_blank')}
timsankara marked this conversation as resolved.
Show resolved Hide resolved
>
<span>{ctaLabel}</span>
<img
src="/icons/chevron_white.svg"
alt="→"
className="ml-3 w-2 h-2"
/>
</button>
</div>
);
};

export default Callout;
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Callout > renders default as expected 1`] = `
<div>
<div
class="callout bg-[radial-gradient(ellipse_at_30%,_#fff_0%,_#6687ff_100%)] rounded-lg py-16 px-8 m-8 flex flex-col items-center"
>
<h2
class="callout__title mb-4 text-center"
>
Join us in our mission to ensure humanity safely navigates the transition to transformative AI.
</h2>
<button
class="cta-button flex items-center justify-center rounded-lg transition-all duration-200 font-semibold text-base cta-button--primary bg-bluedot-normal text-white hover:bg-bluedot-normal px-4 py-2 callout__cta"
data-testid="cta-button"
type="button"
>
<span
class="cta-button__text"
>
View our careers
</span>
<span
class="cta-button__chevron ml-3"
>
<img
alt="→"
class="cta-button__chevron-icon w-2 h-2"
src="/icons/chevron_white.svg"
/>
</span>
</button>
</div>
</div>
`;
Loading