From c18d047d99d9644d958144c56c50783c8a65bf1a Mon Sep 17 00:00:00 2001 From: Gleb Surinov Date: Wed, 3 Jul 2024 10:49:46 +0600 Subject: [PATCH] Moar stylzzz --- .../community/nouns-dao/NounishGovernance.tsx | 13 ++++++++++--- src/fidgets/farcaster/Cast.tsx | 11 +++++++++-- src/fidgets/farcaster/Feed.tsx | 13 ++++++++++--- src/fidgets/farcaster/Frame.tsx | 11 +++++++++-- 4 files changed, 38 insertions(+), 10 deletions(-) diff --git a/src/fidgets/community/nouns-dao/NounishGovernance.tsx b/src/fidgets/community/nouns-dao/NounishGovernance.tsx index 6342df6e..5f02a08b 100644 --- a/src/fidgets/community/nouns-dao/NounishGovernance.tsx +++ b/src/fidgets/community/nouns-dao/NounishGovernance.tsx @@ -1,6 +1,12 @@ +import React, { useEffect, useMemo, useState } from "react"; import { CardContent } from "@/common/components/atoms/card"; import TextInput from "@/common/components/molecules/TextInput"; -import { FidgetArgs, FidgetModule, FidgetProperties } from "@/common/fidgets"; +import { + FidgetArgs, + FidgetModule, + FidgetProperties, + type FidgetSettingsStyle, +} from "@/common/fidgets"; import useGraphqlQuery from "@/common/lib/hooks/useGraphqlQuery"; import { NOUNSBUILD_PROPOSALS_QUERY, @@ -9,12 +15,12 @@ import { } from "@/common/lib/utils/queries"; import ProposalDetailView from "@/fidgets/community/nouns-dao/components/ProposalDetailView"; import ProposalListView from "@/fidgets/community/nouns-dao/components/ProposalListView"; -import React, { useEffect, useMemo, useState } from "react"; +import { defaultStyleFields } from "@/fidgets/helpers"; export type NounishGovernanceSettings = { subgraphUrl: string; daoContractAddress: string; -}; +} & FidgetSettingsStyle; export const nounishGovernanceConfig: FidgetProperties = { fidgetName: "governance", @@ -33,6 +39,7 @@ export const nounishGovernanceConfig: FidgetProperties = { required: true, inputSelector: TextInput, }, + ...defaultStyleFields, ], size: { minHeight: 2, diff --git a/src/fidgets/farcaster/Cast.tsx b/src/fidgets/farcaster/Cast.tsx index 04aee635..2ef7f287 100644 --- a/src/fidgets/farcaster/Cast.tsx +++ b/src/fidgets/farcaster/Cast.tsx @@ -1,14 +1,20 @@ import React from "react"; -import { FidgetArgs, FidgetModule, FidgetProperties } from "@/common/fidgets"; +import { + FidgetArgs, + FidgetModule, + FidgetProperties, + type FidgetSettingsStyle, +} from "@/common/fidgets"; import EmbededCast from "./components/Embeds/EmbededCast"; import { isUndefined } from "lodash"; import TextInput from "@/common/components/molecules/TextInput"; +import { defaultStyleFields } from "@/fidgets/helpers"; type CastFidgetSettings = { castHash?: string; casterFid?: number; castUrl?: string; -}; +} & FidgetSettingsStyle; const castFidgetProperties: FidgetProperties = { fidgetName: "Pinned Cast", @@ -29,6 +35,7 @@ const castFidgetProperties: FidgetProperties = { required: false, inputSelector: TextInput, }, + ...defaultStyleFields, ], size: { minHeight: 1, diff --git a/src/fidgets/farcaster/Feed.tsx b/src/fidgets/farcaster/Feed.tsx index cb23f7e6..c7e0a7dc 100644 --- a/src/fidgets/farcaster/Feed.tsx +++ b/src/fidgets/farcaster/Feed.tsx @@ -1,5 +1,11 @@ import React, { useEffect, useState } from "react"; -import { FidgetArgs, FidgetProperties, FidgetModule } from "@/common/fidgets"; +import { isNil } from "lodash"; +import { + FidgetArgs, + FidgetProperties, + FidgetModule, + type FidgetSettingsStyle, +} from "@/common/fidgets"; import { FeedType } from "@neynar/nodejs-sdk/build/neynar-api/v2"; import { CastRow } from "./components/CastRow"; import { useFarcasterSigner } from "."; @@ -10,7 +16,7 @@ import FeedTypeSelector from "@/common/components/molecules/FeedTypeSelector"; import SettingsSelector from "@/common/components/molecules/SettingsSelector"; import TextInput from "@/common/components/molecules/TextInput"; import { useGetCasts } from "@/common/data/queries/farcaster"; -import { isNil } from "lodash"; +import { defaultStyleFields } from "@/fidgets/helpers"; enum FilterType { Channel = "channel_id", @@ -22,7 +28,7 @@ export type FeedFidgetSettings = { filterType: FilterType; users: string; // this should be a number array, but that requires special inputs to build later channel: string; -}; +} & FidgetSettingsStyle; const FILTER_TYPES = [ { name: "Channel", value: FilterType.Channel }, @@ -82,6 +88,7 @@ const feedProperties: FidgetProperties = { settings.filterType !== FilterType.Channel, default: "", }, + ...defaultStyleFields, ], size: { minHeight: 2, diff --git a/src/fidgets/farcaster/Frame.tsx b/src/fidgets/farcaster/Frame.tsx index c3e90000..e44b45d0 100644 --- a/src/fidgets/farcaster/Frame.tsx +++ b/src/fidgets/farcaster/Frame.tsx @@ -1,13 +1,19 @@ import React from "react"; import TextInput from "@/common/components/molecules/TextInput"; -import { FidgetArgs, FidgetProperties, FidgetModule } from "@/common/fidgets"; +import { + FidgetArgs, + FidgetProperties, + FidgetModule, + type FidgetSettingsStyle, +} from "@/common/fidgets"; import FrameEmbed from "./components/Embeds/FrameEmbed"; import { isValidUrl } from "@/common/lib/utils/url"; import useSafeUrl from "@/common/lib/hooks/useSafeUrl"; +import { defaultStyleFields } from "@/fidgets/helpers"; export type FrameFidgetSettings = { url: string; -}; +} & FidgetSettingsStyle; const frameProperties: FidgetProperties = { fidgetName: "Frame", @@ -17,6 +23,7 @@ const frameProperties: FidgetProperties = { required: true, inputSelector: TextInput, }, + ...defaultStyleFields, ], size: { minHeight: 2,