Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/layout/CustomButton/CustomButtonComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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' {
Expand Down
11 changes: 9 additions & 2 deletions src/layout/CustomButton/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' })
Expand All @@ -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',
}),
);