diff --git a/.storybook/stories/config-pages/LocalFooter.stories.tsx b/.storybook/stories/config-pages/LocalFooter.stories.tsx index 495d97cd..d5485292 100644 --- a/.storybook/stories/config-pages/LocalFooter.stories.tsx +++ b/.storybook/stories/config-pages/LocalFooter.stories.tsx @@ -11,11 +11,6 @@ const meta: Meta = { component: LocalFooter, tags: ['autodocs'], argTypes: { - suLocalFootLocOp: { - description: "Lockup Options", - options: ['a', 'b', 'd', 'e', 'h', 'i', 'm', 'o', 'p', 'r', 's', 't', 'none'], - control: {type: "select"} - }, suFooterEnabled: {control: "boolean"} } }; @@ -31,49 +26,29 @@ export const LocalFooterDisplay: Story = { {title: "Action link 1", url: "https://localhost", internal: false}, {title: "Action link 2", url: "https://localhost", internal: false} ], - suLocalFootAddress: { - additionalName: "additional_name", - addressLine1: "address_line1", - addressLine2: "address_line2", - administrativeArea: "administrative_area", - country: {code: "country_code"}, - familyName: "family_name", - givenName: "given_name", - locality: "locality", - organization: "organization", - postalCode: "postal_code", - sortingCode: "sorting_code", - }, suLocalFootFButton: "suLocalFoot_f_button", suLocalFootFIntro: {processed: "suLocalFoot_f_intro"}, suLocalFootFMethod: "suLocalFoot_f_method", suLocalFootFUrl: {title: "Form Action url", url: "https://localhost", internal: false}, - suLocalFootLine1: "suLocalFoot_line_1", - suLocalFootLine2: "suLocalFoot_line_2", - suLocalFootLine3: "suLocalFoot_line_3", - suLocalFootLine4: "suLocalFoot_line_4", - suLocalFootLine5: "suLocalFoot_line_5", - suLocalFootLocImg: null, suLocalFootLocLink: {title: "suLocalFoot_loc_link", url: "https://localhost", internal: false}, - suLocalFootPrCo: {processed: "suLocalFoot_pr_co"}, + suLocalFootPrCo: {processed: "First Content Block"}, suLocalFootPrimary: [ {title: "Primary link 1", url: "https://localhost", internal: false}, {title: "Primary link 2", url: "https://localhost", internal: false} ], - suLocalFootPrimeH: "suLocalFoot_prime_h", - suLocalFootSeCo: {processed: "suLocalFoot_se_co"}, + suLocalFootPrimeH: "Primary Links Header", + suLocalFootSeCo: {processed: "Second Content Block"}, suLocalFootSecond: [ {title: "Second Link 1", url: "https://localhost", internal: false}, {title: "Second Link 2", url: "https://localhost", internal: false} ], - suLocalFootSecondH: "suLocalFoot_second_h", + suLocalFootSecondH: "Secondary Links Header", suLocalFootSocial: [ {title: "Facebook", url: "https://localhost", internal: false}, {title: "YouTube", url: "https://localhost", internal: false} ], - suLocalFootSunetT: "suLocalFoot_sunet_t", - suLocalFootTr2Co: {processed: "suLocalFoot_tr2_co"}, - suLocalFootTrCo: {processed: "suLocalFoot_tr_co"}, + suLocalFootTr2Co: {processed: "Third Content Block"}, + suLocalFootTrCo: {processed: "Fourth Content Block"}, suLocalFootUseLoc: true, suLocalFootUseLogo: true, suLocalFootLocOp: "suLocalFoot_loc_op", diff --git a/.storybook/stories/elements/lockup/Lockup.stories.tsx b/.storybook/stories/elements/lockup/Lockup.stories.tsx deleted file mode 100644 index 57f5a3f5..00000000 --- a/.storybook/stories/elements/lockup/Lockup.stories.tsx +++ /dev/null @@ -1,142 +0,0 @@ -import type {Meta, StoryObj} from '@storybook/react'; -import Lockup from "@components/elements/lockup/lockup"; -import {ComponentProps} from "react"; -import {Image} from "@lib/gql/__generated__/drupal"; - -type ComponentStoryProps = ComponentProps & { - logoUrl?: Image["url"] -} - -// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction -const meta: Meta = { - title: 'Design/Elements/Lockup', - component: Lockup, - tags: ['autodocs'], - argTypes: { - suLockupOptions: { - options: ['a', 'b', 'd', 'e', 'h', 'i', 'm', 'o', 'p', 'r', 's', 't', 'none'], - control: {type: "select"} - }, - suLockupEnabled: { - control: "boolean" - }, - suUseThemeLogo: { - control: "boolean" - } - } -}; - -export default meta; -type Story = StoryObj; - -// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args -export const LockupDisplay: Story = { - render: ({logoUrl, ...args}) => { - if(logoUrl) args.suUploadLogoImage = {url: logoUrl, height: 50, width: 300, size: 123, focalY: 50, focalX: 50} - return - }, - args: { - suLine1: "Line 1", - suLine2: "Line 2", - suLine3: "Line 3", - suLine4: "Line 4", - suLine5: "Line 5", - suSiteName: "Site Name", - suUseThemeLogo: true, - logoUrl: "https://placehold.co/300x50", - suLockupEnabled: true, - suLockupOptions: "none", - }, -}; - -export const LockupA: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "a" - } -} -export const LockupB: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "b" - } -} -export const LockupD: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "d" - } -} -export const LockupE: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "e" - } -} -export const LockupH: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "h" - } -} -export const LockupI: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "i" - } -} -export const LockupM: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "m" - } -} -export const LockupO: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "o" - } -} -export const LockupP: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "p" - } -} -export const LockupR: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "r" - } -} -export const LockupS: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "s" - } -} -export const LockupT: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "t" - } -} -export const LockupNone: Story = { - render: LockupDisplay.render, - args: { - ...LockupDisplay.args, - suLockupOptions: "none" - } -} diff --git a/src/components/elements/lockup/lockup-logo.tsx b/src/components/elements/lockup/lockup-logo.tsx index 82bea3c5..9ba6252e 100644 --- a/src/components/elements/lockup/lockup-logo.tsx +++ b/src/components/elements/lockup/lockup-logo.tsx @@ -2,7 +2,7 @@ import {Maybe} from "@lib/gql/__generated__/drupal.d"; import PressFooterLogoLg from "@components/images/logo-lg"; import PressFooterLogoXs from "@components/images/logo-xs"; -const LockupLogo = ({logoUrl, siteName = ""}: { logoUrl?: Maybe, siteName?: Maybe }) => { +const LockupLogo = ({logoUrl}: { logoUrl?: Maybe, siteName?: Maybe }) => { return ( <>