Skip to content

Commit

Permalink
add sticky styles for signup button
Browse files Browse the repository at this point in the history
  • Loading branch information
winkerVSbecks committed Dec 12, 2024
1 parent 18980ed commit 1e58f92
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
20 changes: 20 additions & 0 deletions src/Header/Header.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,26 @@ export const DesktopDark: Story = {
},
};

export const DesktopLightSticky: Story = {
...DesktopLight,
args: {
...DesktopLight.args,
isSticky: true,
},
};

export const DesktopDarkSticky: Story = {
args: {
...DesktopLight.args,
theme: 'dark',
isSticky: true,
},
parameters: {
...DesktopLight.parameters,
backgrounds: { default: 'dark' },
},
};

export const DesktopLoggedOut: Story = {
args: {
...DesktopLight.args,
Expand Down
5 changes: 3 additions & 2 deletions src/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export const Header = ({
fullWidth = false,
loggedIn,
maintenanceMode,
isSticky,
TrackSignUp = DefaultTrackSignUp,
}: HeaderProps) => {
const HeaderContainer = fullWidth ? FullWidthContainer : Container;
Expand Down Expand Up @@ -151,8 +152,8 @@ export const Header = ({
<HeaderCTAButton
as="span"
size="sm"
variant="outline"
color={theme === 'dark' ? 'white' : 'blue'}
variant={isSticky ? 'solid' : 'outline'}
color={theme === 'light' || isSticky ? 'blue' : 'white'}
href={links.signup.href}
>
{links.signup.title}
Expand Down
1 change: 1 addition & 0 deletions src/Header/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export interface HeaderProps {
fullWidth?: boolean;
loggedIn?: boolean;
maintenanceMode?: boolean;
isSticky?: boolean;
links: HeaderLinks;
TrackSignUp: ComponentType<{ children: ReactNode }>;
}
Expand Down

0 comments on commit 1e58f92

Please sign in to comment.