Skip to content

Commit

Permalink
Moar stylzzz
Browse files Browse the repository at this point in the history
  • Loading branch information
glebovsky authored and j-paterson committed Jul 7, 2024
1 parent 222fae2 commit c18d047
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 10 deletions.
13 changes: 10 additions & 3 deletions src/fidgets/community/nouns-dao/NounishGovernance.tsx
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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",
Expand All @@ -33,6 +39,7 @@ export const nounishGovernanceConfig: FidgetProperties = {
required: true,
inputSelector: TextInput,
},
...defaultStyleFields,
],
size: {
minHeight: 2,
Expand Down
11 changes: 9 additions & 2 deletions src/fidgets/farcaster/Cast.tsx
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -29,6 +35,7 @@ const castFidgetProperties: FidgetProperties = {
required: false,
inputSelector: TextInput,
},
...defaultStyleFields,
],
size: {
minHeight: 1,
Expand Down
13 changes: 10 additions & 3 deletions src/fidgets/farcaster/Feed.tsx
Original file line number Diff line number Diff line change
@@ -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 ".";
Expand All @@ -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",
Expand All @@ -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 },
Expand Down Expand Up @@ -82,6 +88,7 @@ const feedProperties: FidgetProperties<FeedFidgetSettings> = {
settings.filterType !== FilterType.Channel,
default: "",
},
...defaultStyleFields,
],
size: {
minHeight: 2,
Expand Down
11 changes: 9 additions & 2 deletions src/fidgets/farcaster/Frame.tsx
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -17,6 +23,7 @@ const frameProperties: FidgetProperties = {
required: true,
inputSelector: TextInput,
},
...defaultStyleFields,
],
size: {
minHeight: 2,
Expand Down

0 comments on commit c18d047

Please sign in to comment.