Skip to content

Commit 4f94201

Browse files
Comment block
1 parent a3b75eb commit 4f94201

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/widgets/buttons.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,13 +484,15 @@ export function deleteButtonWithCheck (
484484
return deleteButtonElt
485485
}
486486

487+
/**
488+
* Get the button style, based on options.
489+
* See https://design.inrupt.com/atomic-core/?cat=Atoms#Buttons
490+
*/
487491
function getButtonStyle (options: ButtonWidgetOptions = { buttonColor: 'Primary', needsBorder: false }) {
488492
const color: string = (options.buttonColor === 'Primary') ? '#7c4dff' : '#01C9EA'
489493
let backgroundColor: string = color
490494
let fontColor: string = '#ffffff'
491495
let borderColor: string = color
492-
// hoverBackground in design.inrupt.com is rgb, using the equivalent hex here
493-
// lighten is used in design.inrupt.com, but this only works in sass and less
494496
let hoverBackgroundColor: string = (options.buttonColor === 'Primary') ? '#9f7dff' : '#37cde6'
495497
let hoverFontColor: string = fontColor
496498
if (options.needsBorder) {
@@ -501,7 +503,6 @@ function getButtonStyle (options: ButtonWidgetOptions = { buttonColor: 'Primary'
501503
hoverFontColor = backgroundColor
502504
}
503505

504-
// See https://design.inrupt.com/atomic-core/?cat=Atoms#Buttons
505506
return {
506507
'background-color': `${backgroundColor}`,
507508
color: `${fontColor}`,

0 commit comments

Comments
 (0)