Skip to content

Commit

Permalink
feat(i18n): translate card grid
Browse files Browse the repository at this point in the history
  • Loading branch information
juliankoehn committed Jan 1, 2025
1 parent 1648859 commit 1666836
Show file tree
Hide file tree
Showing 5 changed files with 11,759 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/blocks/card-grid/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ export const CardGrid: Block = {
name: "heading",
type: "text",
label: "Heading",
localized: true,
},
{
name: "description",
type: "text",
label: "Description",
localized: true,
},
{
name: "layout",
Expand Down Expand Up @@ -50,22 +52,25 @@ export const CardGrid: Block = {
name: "title",
type: "text",
required: true,
localized: true,
},
{
name: "subtitle",
type: "text",
localized: true,
},
{
name: "description",
type: "textarea",
localized: true,
},
{
name: "media",
type: "upload",
relationTo: "media",
required: false,
},
link(),
link({ localized: true }),
{
name: "appearance",
type: "group",
Expand Down
3 changes: 3 additions & 0 deletions src/fields/link/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ export const appearanceOptions: Record<

type LinkType = (options?: {
appearances?: LinkAppearances[] | false;
localized?: boolean;
disableLabel?: boolean;
additionalFields?: Field[];
overrides?: Partial<Field>;
}) => Field;

export const link: LinkType = ({
localized = false,
appearances,
disableLabel = false,
additionalFields = [],
Expand Down Expand Up @@ -119,6 +121,7 @@ export const link: LinkType = ({
},
label: "Label",
required: true,
localized,
},
],
});
Expand Down
Loading

0 comments on commit 1666836

Please sign in to comment.