-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
6a41fc7
commit cb4776e
Showing
5 changed files
with
80 additions
and
28 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { cnb } from 'cnbuilder'; | ||
|
||
export const root = (isLightText: boolean) => cnb( | ||
'group flex items-center justify-center size-40 md:size-55 rounded-full border-2 shrink-0 hocus-visible:border-digital-red-light hocus-visible:bg-digital-red-light', | ||
isLightText ? 'border-white' : 'border-gc-black', | ||
); | ||
|
||
export const icon = (isLightText: boolean) => cnb( | ||
'inline-block stroke-[3px]', | ||
isLightText ? 'text-white' : 'text-gc-black', | ||
); |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { HeroIcon } from '@/components/HeroIcon'; | ||
import { SrOnlyText } from '@/components/Typography'; | ||
import { cnb } from 'cnbuilder'; | ||
import * as styles from './NextPrevButton.styles'; | ||
|
||
type NextPrevButtonProps = { | ||
direction: 'next' | 'prev'; | ||
isLightText?: boolean; | ||
onClick?: () => void; | ||
className?: string; | ||
}; | ||
|
||
export const NextPrevButton = ({ | ||
direction = 'next', | ||
isLightText, | ||
onClick, | ||
className, | ||
}: NextPrevButtonProps) => ( | ||
<button | ||
type="button" | ||
className={cnb(styles.root(isLightText), className)} | ||
onClick={onClick} | ||
> | ||
<SrOnlyText>{`${direction === 'next' ? 'Next' : 'Previous'} slide`}</SrOnlyText> | ||
<HeroIcon | ||
icon={direction === 'next' ? 'chevron-right' : 'chevron-left'} | ||
className={styles.icon(isLightText)} | ||
/> | ||
</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