diff --git a/src/layout/CustomButton/CustomButtonComponent.tsx b/src/layout/CustomButton/CustomButtonComponent.tsx index 6e3b23b993..0729f088dc 100644 --- a/src/layout/CustomButton/CustomButtonComponent.tsx +++ b/src/layout/CustomButton/CustomButtonComponent.tsx @@ -175,6 +175,7 @@ function useHandleServerActionMutationFn(acquireLock: FormDataLocking) { export const buttonStyles: { [style in CBTypes.ButtonStyle]: { color: ButtonColor; variant: ButtonVariant } } = { primary: { variant: 'primary', color: 'success' }, secondary: { variant: 'secondary', color: 'first' }, + tertiary: { variant: 'tertiary', color: 'second' }, }; function toShorthandSize(size?: CBTypes.CustomButtonSize): 'sm' | 'md' | 'lg' { diff --git a/src/layout/CustomButton/config.ts b/src/layout/CustomButton/config.ts index 16c553d27d..6c233ad873 100644 --- a/src/layout/CustomButton/config.ts +++ b/src/layout/CustomButton/config.ts @@ -58,7 +58,7 @@ export const Config = new CG.component({ .addProperty( new CG.prop( 'buttonStyle', - new CG.enum('primary', 'secondary') + new CG.enum('primary', 'secondary', 'tertiary') .setTitle('Button style') .setDescription('The style/color scheme of the button.') .optional({ default: 'secondary' }) @@ -85,4 +85,11 @@ export const Config = new CG.component({ .exportAs('CustomButtonSize'), ), ) - .addTextResource(new CG.trb({ name: 'title', title: 'Title', description: 'The title/text on the button' })); + .addTextResource(new CG.trb({ name: 'title', title: 'Title', description: 'The title/text on the button' })) + .addTextResource( + new CG.trb({ + name: 'tableTitle', + title: 'Table title', + description: 'The title/text for the button when rendered in a table', + }), + );