-
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.
Merge pull request #58 from PhillipsAuctionHouse/footer
L3-40: Build out Footer Component
- Loading branch information
Showing
55 changed files
with
1,527 additions
and
439 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/dist | ||
/dist | ||
/storybook-static |
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 |
---|---|---|
|
@@ -34,4 +34,5 @@ coverage | |
|
||
*.notes.md | ||
|
||
CHANGELOG.md | ||
CHANGELOG.md | ||
src/design/type-tokens/type-tokens.mdx |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,102 @@ | ||
import type { Meta } from '@storybook/react'; | ||
|
||
import Footer, { FooterProps } from './Footer'; | ||
import Subscribe from '../Subscribe/Subscribe'; | ||
import { px } from '../../utils'; | ||
|
||
import Youtube from '../../assets/youtube.svg?react'; | ||
import Instagram from '../../assets/instagram.svg?react'; | ||
import Wechat from '../../assets/wechat.svg?react'; | ||
import Spotify from '../../assets/spotify.svg?react'; | ||
import Social from '../Social/Social'; | ||
|
||
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction | ||
const meta = { | ||
title: 'Components/Footer', | ||
component: Footer, | ||
tags: ['autodocs'], | ||
} satisfies Meta<typeof Footer>; | ||
|
||
export default meta; | ||
|
||
const navigationComponent = ( | ||
<ul> | ||
<li> | ||
<a>Locations</a> | ||
</li> | ||
<li> | ||
<a>Press</a> | ||
</li> | ||
<li> | ||
<a>Careers</a> | ||
</li> | ||
<li> | ||
<a>Privacy policy</a> | ||
</li> | ||
<li> | ||
<a>Cookie policy</a> | ||
</li> | ||
<li> | ||
<a>Modern Slavery Policy</a> | ||
</li> | ||
</ul> | ||
); | ||
|
||
const socialIcons = ( | ||
<ul> | ||
<li> | ||
<a> | ||
<Youtube /> | ||
</a> | ||
</li> | ||
<li> | ||
<a> | ||
<Instagram /> | ||
</a> | ||
</li> | ||
<li> | ||
<a> | ||
<Wechat /> | ||
</a> | ||
</li> | ||
<li> | ||
<a> | ||
<Spotify /> | ||
</a> | ||
</li> | ||
</ul> | ||
); | ||
|
||
const leftComponent = ( | ||
<Subscribe | ||
className={`${px}-footer__newsletter`} | ||
title="Subscribe to Newsletter" | ||
blurb="Receive exclusive content about our auctions, exhibitions, and special events." | ||
buttonText="Sign Up" | ||
element="form" | ||
buttonProps={{ | ||
size: 'sm', | ||
onClick: (e: React.MouseEvent) => { | ||
e.preventDefault(); | ||
const inputElement = (e.target as HTMLElement).closest('form')?.querySelector('input'); | ||
if (inputElement) { | ||
console.log(`subscribe ${inputElement.value}`); | ||
inputElement.value = ''; | ||
} | ||
}, | ||
}} | ||
/> | ||
); | ||
|
||
const rightComponent = <Social className={`${px}-footer__social`}>{socialIcons}</Social>; | ||
|
||
export const Playground = (props: FooterProps) => ( | ||
<Footer {...props}> | ||
{leftComponent} | ||
{rightComponent} | ||
</Footer> | ||
); | ||
|
||
Playground.args = { | ||
navigationComponent, | ||
}; |
Oops, something went wrong.