-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Add social sign in guidelines to the website
- Loading branch information
Showing
6 changed files
with
100 additions
and
26 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
22 changes: 22 additions & 0 deletions
22
apps/for-everyone-website/src/components/button/SocialPreview.astro
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,22 @@ | ||
--- | ||
import * as Component from './preview/Social.tsx' | ||
import Preview from '../utils/Preview.astro'; | ||
import FigmaSbLinks from '../utils/FigmaSbLinks.astro'; | ||
const {brand} = Astro.props; | ||
const storybookId = `${brand}-o3-social-sign-in--social-sign-in-stories`; | ||
--- | ||
|
||
<div class="social-preview-container"> | ||
<Preview component={Component} /> | ||
<FigmaSbLinks {storybookId} /> | ||
</div> | ||
|
||
|
||
<style> | ||
.social-preview-container { | ||
--preview-display: grid; | ||
--preview-justify: auto; | ||
} | ||
</style> |
17 changes: 17 additions & 0 deletions
17
apps/for-everyone-website/src/components/button/preview/Social.tsx
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,17 @@ | ||
import {SocialSignIn} from '@financial-times/o3-social-sign-in'; | ||
|
||
function SocialSignInPreview() { | ||
return ( | ||
<> | ||
<meta itemProp="@preview" /> | ||
<> | ||
<SocialSignIn provider="apple" text="Sign in with Apple" /> | ||
<SocialSignIn provider="google" text="Sign in with Google" /> | ||
</> | ||
<meta itemProp="@preview" /> | ||
</> | ||
); | ||
} | ||
export const filePath = 'src/components/button/preview/Social.tsx'; | ||
|
||
export {SocialSignInPreview as preview}; |
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.