-
Notifications
You must be signed in to change notification settings - Fork 21
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
Shane Osbourne
committed
Oct 11, 2024
1 parent
ccb9d2c
commit 5527bec
Showing
7 changed files
with
164 additions
and
80 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
Empty file.
40 changes: 40 additions & 0 deletions
40
packages/special-pages/pages/new-tab/app/components/Examples.jsx
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,40 @@ | ||
import { h } from "preact"; | ||
import { PrivacyStatsMockProvider } from "../privacy-stats/mocks/PrivacyStatsMockProvider.js"; | ||
import { Body, Heading, PrivacyStatsConsumer } from "../privacy-stats/PrivacyStats.js"; | ||
import { stats } from "../privacy-stats/mocks/stats.js"; | ||
|
||
/** @type {Record<string, {factory: () => import("preact").ComponentChild}>} */ | ||
export const mainExamples = { | ||
'stats.few': { | ||
factory: () => <PrivacyStatsMockProvider ticker={true}><PrivacyStatsConsumer/></PrivacyStatsMockProvider> | ||
}, | ||
'stats.few.collapsed': { | ||
factory: () => <PrivacyStatsMockProvider | ||
config={{expansion: "collapsed"}}><PrivacyStatsConsumer/></PrivacyStatsMockProvider> | ||
}, | ||
'stats.single': { | ||
factory: () => <PrivacyStatsMockProvider data={stats.single}><PrivacyStatsConsumer/></PrivacyStatsMockProvider> | ||
}, | ||
'stats.none': { | ||
factory: () => <PrivacyStatsMockProvider data={stats.none}><PrivacyStatsConsumer/></PrivacyStatsMockProvider> | ||
}, | ||
'stats.norecent': { | ||
factory: () => <PrivacyStatsMockProvider | ||
data={stats.norecent}><PrivacyStatsConsumer/></PrivacyStatsMockProvider> | ||
}, | ||
'stats.list': { | ||
factory: () => <Body trackerCompanies={stats.few.trackerCompanies}/> | ||
}, | ||
'stats.heading': { | ||
factory: () => <Heading trackerCompanies={stats.few.trackerCompanies} totalCount={stats.few.totalCount}/> | ||
}, | ||
'stats.heading.none': { | ||
factory: () => <Heading trackerCompanies={stats.none.trackerCompanies} totalCount={stats.none.totalCount}/> | ||
}, | ||
} | ||
|
||
export const otherExamples = { | ||
'stats.with-animation': { | ||
factory: () => <PrivacyStatsMockProvider ticker={true} animate={true}><PrivacyStatsConsumer/></PrivacyStatsMockProvider> | ||
}, | ||
} |
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