Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
bf2fa5f
Set up ShadCN.
chadstewart Sep 19, 2023
424a266
Replacing some css that shadcn-ui deleted when setting up styles.css
chadstewart Sep 20, 2023
ba9baaa
Refactoring HeaderText component to remove ChakraUI
Wayne-Jones Oct 5, 2023
f98aed8
Fixing Heading size via tailwind classes for contact heading
Wayne-Jones Oct 5, 2023
ed6020d
Refactoring Default Text component
Wayne-Jones Oct 6, 2023
01fe169
Removal of Chakra UI from contact heading component
Wayne-Jones Oct 6, 2023
0b550c7
Refactored Text Input component and removed ChakraUI components
Wayne-Jones Oct 7, 2023
30161fd
Refactored TextBox component and removed ChakraUI components
Wayne-Jones Oct 7, 2023
6e6d6d7
Moving width out of textinput and textbox component
Wayne-Jones Oct 7, 2023
1be0496
Fixing width for TextInput and TextBox to be passed in as classes, Re…
Wayne-Jones Oct 7, 2023
9925d4f
Refactoring DefaultButton component to include option to output as a …
Wayne-Jones Oct 7, 2023
0cfdcc5
Fixed DefaultButton attributes on NavLink to pass in similar visual t…
Wayne-Jones Oct 7, 2023
046b243
Refactoring DefaultButton on ContactForm page to pass in visual tailw…
Wayne-Jones Oct 7, 2023
76c11f4
Refactoring DefaultButton on AboutBanner to include visual styles in …
Wayne-Jones Oct 7, 2023
c21c134
Refactored HeaderText to include props from HTMLHeadingElement
Wayne-Jones Oct 7, 2023
35b21ba
Replaced ChakraUI attributes with tailwind classes
Wayne-Jones Oct 7, 2023
b961956
Refactored DefaultText component to allow for as attribute
Wayne-Jones Oct 7, 2023
df84b1f
Replacing ChakraUI attr with tailwind classes
Wayne-Jones Oct 7, 2023
fda2a1b
Cleaned up unused import
Wayne-Jones Nov 17, 2023
508c082
Adding isInvalid state to TextInput and TextBox
Wayne-Jones Nov 18, 2023
80b2a93
Preventing default submit action for button
Wayne-Jones Nov 18, 2023
2f9dae8
Fixing bug with textbox border
Wayne-Jones Nov 18, 2023
c99dab1
Fixing click event type
Wayne-Jones Nov 18, 2023
747f5e2
Styling fixes for TextInput and TextBox
Wayne-Jones Nov 18, 2023
b7c217d
Added more responsiveness to mimick behavior in prod
Wayne-Jones Nov 18, 2023
118b8e6
Fixing NavLink sizing
Wayne-Jones Nov 18, 2023
c451a66
Fixing heading for TwitterFeed
Wayne-Jones Nov 18, 2023
491e8e2
Cleaning up conditionals and default values
Wayne-Jones Nov 18, 2023
fe96535
Refactoring Spinner component
Wayne-Jones Nov 18, 2023
1cf48e5
Adding back colors that were removed from tailwind config
Wayne-Jones Nov 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/styles/globals.css",
"baseColor": "slate",
"cssVariables": false
},
"aliases": {
"components": "components",
"utils": "lib/utils/utils"
}
}
142 changes: 134 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.4",
"@sendgrid/mail": "^7.7.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"framer-motion": "^6.5.1",
"lucide-react": "^0.279.0",
"next": "^13.2.4",
"next-sitemap": "^3.1.29",
"posthog-js": "^1.33.0",
Expand All @@ -32,6 +35,8 @@
"react-twitter-embed": "^4.0.4",
"sharp": "^0.32.0",
"storybook-addon-next": "^1.8.0",
"tailwind-merge": "^1.14.0",
"tailwindcss-animate": "^1.0.7",
"zod": "^3.21.4"
},
"devDependencies": {
Expand Down
39 changes: 31 additions & 8 deletions src/components/atoms/button/button.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,37 @@
import { Button as ChakraButtonComponent } from "@chakra-ui/react";
import React from "react";

interface ButtonProps
extends React.ComponentProps<typeof ChakraButtonComponent> {
//Add additional prop definitions here
// Define a type for the possible "as" values
type AsType = 'a' | 'button';

// Create a union type for the allowed props based on "as" value
type ElementProps = AsType extends 'a'
? React.AnchorHTMLAttributes<HTMLAnchorElement>
: React.ButtonHTMLAttributes<HTMLButtonElement>;

interface ButtonProps extends ElementProps {
as?: AsType;
href?: string;
}

const DefaultButton = (props: ButtonProps) => {
return (
<ChakraButtonComponent {...props}>{props.children}</ChakraButtonComponent>
);
const DefaultButton = ({as = "button", children, className = "", ...props}: ButtonProps) => {
if( as === "a"){
const {...anchorProps} = props as React.AnchorHTMLAttributes<HTMLAnchorElement>;
return (
<a {...anchorProps} className={`${className} ` +
`inline-flex appearance-none items-center justify-center relative whitespace-nowrap align-middle outline outline-2 outline-transparent outline-offset-2 leading-tight font-semibold transition duration-200 h-10 min-w-[2.5rem] text-base px-4 py-3`}>
{children}
</a>
)
}
else{
const {...buttonProps} = props as React.ButtonHTMLAttributes<HTMLButtonElement>;
return (
<button {...buttonProps} className={`${className} ` +
`inline-flex appearance-none items-center justify-center relative whitespace-nowrap align-middle outline outline-2 outline-transparent outline-offset-2 leading-tight font-semibold transition duration-200 h-10 min-w-[2.5rem] text-base px-4 py-3`}>
{children}
</button>
)
}
};

export default DefaultButton;
10 changes: 3 additions & 7 deletions src/components/atoms/nav-link/nav-link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,15 @@ const NavLink = ({ url, text, activeLink, button, externalLink, footer = false }
>
{footer === false && button === true ?
<DefaultButton
className=""
variant="solid"
size="md"
colorScheme="facebook"
className="text-white rounded-md bg-[#385898] hover:bg-[#314E89] active:bg-[#29487D] focus-visible:shadow-[0_0_0_3px_rgb(66,153,225,0.6)]"
>
<DefaultText className="text-white" fontSize="lg" as="span">
<DefaultText className="text-white text-lg leading-[21.6px]" as="span">
{text}
</DefaultText>
</DefaultButton>
:
<DefaultText
className={`${activeLink ? "border-b-2 border-blue-500 text-blue-500" : ""}`}
fontSize="lg"
className={`${activeLink ? "border-b-2 border-blue-500 text-blue-500" : ""} text-lg`}
as="span">
{text}
</DefaultText>
Expand Down
Loading