|
| 1 | +import { type EditionId } from '../../lib/edition'; |
| 2 | +import type { TagType } from '../../types/tag'; |
1 | 3 | import { Section } from '../Section';
|
2 | 4 | import { SignInGateSelector } from '../SignInGateSelector.importable';
|
3 | 5 | import { SignInGateCustomizableText } from './gateDesigns/SignInGateCustomizableText';
|
@@ -154,3 +156,110 @@ signInGateMainCheckoutCompletePersonalisedCopy.argTypes = {
|
154 | 156 | control: { type: 'radio' },
|
155 | 157 | },
|
156 | 158 | };
|
| 159 | + |
| 160 | +export const signInGateSelectorStoryDismissable = () => { |
| 161 | + const tags: TagType[] = [ |
| 162 | + { id: 'politics/politics', type: 'Keyword', title: 'Politics' }, |
| 163 | + { id: 'world/europe-news', type: 'Keyword', title: 'Europe News' }, |
| 164 | + ]; |
| 165 | + |
| 166 | + return ( |
| 167 | + <Section fullWidth={true}> |
| 168 | + <SignInGateSelector |
| 169 | + contentType="Article" |
| 170 | + sectionId="dismissable" |
| 171 | + tags={tags} |
| 172 | + isPaidContent={false} |
| 173 | + isPreview={false} |
| 174 | + pageId="dismissable" |
| 175 | + host="https://www.theguardian.com" |
| 176 | + idUrl="https://profile.theguardian.com" |
| 177 | + contributionsServiceUrl="https://contributions.guardianapis.com" |
| 178 | + editionId={'UK' as EditionId} |
| 179 | + /> |
| 180 | + </Section> |
| 181 | + ); |
| 182 | +}; |
| 183 | + |
| 184 | +signInGateSelectorStoryDismissable.storyName = |
| 185 | + 'sign_in_gate_selector_dismissable'; |
| 186 | + |
| 187 | +export const signInGateSelectorStoryNonDismissable = () => { |
| 188 | + const tags: TagType[] = [ |
| 189 | + { id: 'politics/politics', type: 'Keyword', title: 'Politics' }, |
| 190 | + { id: 'world/europe-news', type: 'Keyword', title: 'Europe News' }, |
| 191 | + ]; |
| 192 | + |
| 193 | + return ( |
| 194 | + <Section fullWidth={true}> |
| 195 | + <SignInGateSelector |
| 196 | + contentType="Article" |
| 197 | + sectionId="non-dismissable" |
| 198 | + tags={tags} |
| 199 | + isPaidContent={false} |
| 200 | + isPreview={false} |
| 201 | + pageId="non-dismissable" |
| 202 | + host="https://www.theguardian.com" |
| 203 | + idUrl="https://profile.theguardian.com" |
| 204 | + contributionsServiceUrl="https://contributions.guardianapis.com" |
| 205 | + editionId={'UK' as EditionId} |
| 206 | + /> |
| 207 | + </Section> |
| 208 | + ); |
| 209 | +}; |
| 210 | + |
| 211 | +signInGateSelectorStoryNonDismissable.storyName = |
| 212 | + 'sign_in_gate_selector_non_dismissable'; |
| 213 | + |
| 214 | +export const signInGateSelectorStoryLegacy = () => { |
| 215 | + const tags: TagType[] = [ |
| 216 | + { id: 'politics/politics', type: 'Keyword', title: 'Politics' }, |
| 217 | + { id: 'world/europe-news', type: 'Keyword', title: 'Europe News' }, |
| 218 | + ]; |
| 219 | + |
| 220 | + return ( |
| 221 | + <Section fullWidth={true}> |
| 222 | + <SignInGateSelector |
| 223 | + contentType="Article" |
| 224 | + sectionId="legacy" |
| 225 | + tags={tags} |
| 226 | + isPaidContent={false} |
| 227 | + isPreview={false} |
| 228 | + pageId="legacy" |
| 229 | + host="https://www.theguardian.com" |
| 230 | + idUrl="https://profile.theguardian.com" |
| 231 | + contributionsServiceUrl="https://contributions.guardianapis.com" |
| 232 | + editionId={'UK' as EditionId} |
| 233 | + /> |
| 234 | + </Section> |
| 235 | + ); |
| 236 | +}; |
| 237 | + |
| 238 | +signInGateSelectorStoryLegacy.storyName = 'sign_in_gate_selector_legacy'; |
| 239 | + |
| 240 | +export const signInGateSelectorStoryNoTreatment = () => { |
| 241 | + const tags: TagType[] = [ |
| 242 | + { id: 'politics/politics', type: 'Keyword', title: 'Politics' }, |
| 243 | + { id: 'world/europe-news', type: 'Keyword', title: 'Europe News' }, |
| 244 | + ]; |
| 245 | + |
| 246 | + return ( |
| 247 | + <Section fullWidth={true}> |
| 248 | + <SignInGateSelector |
| 249 | + contentType="Article" |
| 250 | + sectionId="no-treatment" |
| 251 | + tags={tags} |
| 252 | + isPaidContent={false} |
| 253 | + isPreview={false} |
| 254 | + pageId="no-treatment" |
| 255 | + host="https://www.theguardian.com" |
| 256 | + idUrl="https://profile.theguardian.com" |
| 257 | + contributionsServiceUrl="https://contributions.guardianapis.com" |
| 258 | + editionId={'UK' as EditionId} |
| 259 | + /> |
| 260 | + </Section> |
| 261 | + ); |
| 262 | +}; |
| 263 | + |
| 264 | +signInGateSelectorStoryNoTreatment.storyName = |
| 265 | + 'sign_in_gate_selector_no_treatment'; |
0 commit comments