File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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+ */
487491function 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 } ` ,
You can’t perform that action at this time.
0 commit comments