From 6773846236e3bbe44e67590ad4ead3109ce39bb2 Mon Sep 17 00:00:00 2001 From: jwc780 Date: Wed, 15 Jul 2020 11:04:41 -0400 Subject: [PATCH] fix: tweaked button colors --- src/components/App.css | 51 +++++++++++++++++++ src/components/App.tsx | 4 +- src/components/Charts/Charts.css | 4 +- src/components/Charts/Charts.tsx | 13 +++-- src/components/SettingsBar/SettingsBar.tsx | 3 +- src/components/SettingsBar/SettingsRadio.tsx | 2 +- src/components/ShellForms/ShellForms.css | 5 +- src/components/ShellForms/ShellForms.tsx | 10 ++-- .../SupportFooter/SupportFooter.css | 6 +-- src/components/TargetForms/TargetForms.tsx | 6 ++- .../UtilityComponents/DownloadButton.tsx | 2 +- 11 files changed, 81 insertions(+), 25 deletions(-) diff --git a/src/components/App.css b/src/components/App.css index fd828fc..c0bfcb9 100644 --- a/src/components/App.css +++ b/src/components/App.css @@ -140,4 +140,55 @@ i.question.circle.icon{ .inputs > .target{ grid-column: span 1; +} + +/* Custom Colors */ +:root{ + --blue-c1: #0071bc; + --blue-c2: #045da4; + --blue-c3: #07537d; + --blue-c3-t: rgba(7, 51, 125, 0.5); + --blue-c4: #205493; + --blue-c5: #5d8fe4; +} + + +/* Custom Button Coloring */ +.btn-custom-blue { + color: #fff!important; + background-color: var(--blue-c1)!important; + border-color: var(--blue-c1)!important; +} + +.btn-custom-blue:hover { + color: #fff!important; + background-color: var(--blue-c2)!important; + border-color: var(--blue-c2)!important; +} + +.btn-check:focus + .btn-custom-blue, .btn-custom-blue:focus, .btn-custom-blue.focus { + color: #fff!important; + background-color: var(--blue-c3)!important; + border-color: var(--blue-c3)!important; + box-shadow: 0 0 0 0.2rem var(--blue-c3-t)!important; +} + +.btn-check:checked + .btn-custom-blue, +.btn-check:active + .btn-custom-blue, .btn-custom-blue:active, .btn-custom-blue.active, +.show > .btn-custom-blue.dropdown-toggle { + color: #fff!important; + background-color: var(--blue-c4)!important; + border-color: var(--blue-c3)!important; +} + +.btn-check:checked + .btn-custom-blue:focus, +.btn-check:active + .btn-custom-blue:focus, .btn-custom-blue:active:focus, .btn-custom-blue.active:focus, +.show > .btn-custom-blue.dropdown-toggle:focus { + box-shadow: 0 0 0 0.2rem var(--blue-c3-t)!important; +} + +.btn-custom-blue:disabled, .btn-custom-blue.disabled { + color: #fff!important; + background-color: var(--blue-c5)!important; + border-color: var(--blue-c5)!important; } \ No newline at end of file diff --git a/src/components/App.tsx b/src/components/App.tsx index ad6c514..1233f92 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -300,8 +300,8 @@ class App extends React.Component<{},{}> {
- diff --git a/src/components/Charts/Charts.css b/src/components/Charts/Charts.css index 778d59e..0b53e6e 100644 --- a/src/components/Charts/Charts.css +++ b/src/components/Charts/Charts.css @@ -2,7 +2,7 @@ display: grid !important; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); grid-gap: 0; - background-color: #6c757d; + background-color: var(--blue-c5); font-size: 1.25rem; } @@ -25,4 +25,4 @@ .graph-icon{ opacity: 0; -} \ No newline at end of file +} diff --git a/src/components/Charts/Charts.tsx b/src/components/Charts/Charts.tsx index 7aaf1ce..e6a0d18 100644 --- a/src/components/Charts/Charts.tsx +++ b/src/components/Charts/Charts.tsx @@ -88,7 +88,7 @@ export class SingleChart extends React.Component +
); }else{ return( -
+
{this.renderContent()}
); @@ -145,8 +145,7 @@ class SubGroup extends React.Component {config[singleChartIndex.name]} @@ -649,7 +648,7 @@ export class ChartGroup extends React.Component{ } render(){ return( -<> +
@@ -700,7 +699,7 @@ export class ChartGroup extends React.Component{ {this.addChart('post')} - + ); } //componentDidMount(){} diff --git a/src/components/SettingsBar/SettingsBar.tsx b/src/components/SettingsBar/SettingsBar.tsx index beacc3e..86d8001 100644 --- a/src/components/SettingsBar/SettingsBar.tsx +++ b/src/components/SettingsBar/SettingsBar.tsx @@ -16,13 +16,14 @@ export class SettingsBar extends React.Component this.setState((current) => {return {open: !current.open}}); render(){ const {settings} = this.props, {open} = this.state; + const active = open === true ? 'active' : ''; return( <> diff --git a/src/components/SettingsBar/SettingsRadio.tsx b/src/components/SettingsBar/SettingsRadio.tsx index 1dfa600..68ada08 100644 --- a/src/components/SettingsBar/SettingsRadio.tsx +++ b/src/components/SettingsBar/SettingsRadio.tsx @@ -25,7 +25,7 @@ export const SettingsRadio: React.FunctionComponent = React. {option} ); diff --git a/src/components/ShellForms/ShellForms.css b/src/components/ShellForms/ShellForms.css index 38e3821..bc82a99 100644 --- a/src/components/ShellForms/ShellForms.css +++ b/src/components/ShellForms/ShellForms.css @@ -3,7 +3,8 @@ } .modal-header, .modal-body, .modal-footer{ - padding: .5rem; + padding: 0rem; + padding-right: .5rem; } .footer-style{ @@ -20,7 +21,7 @@ margin-bottom: .5rem; background-color: #f2f2f2; display: grid; - grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); + grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); grid-gap: .5rem; padding: 1rem; } \ No newline at end of file diff --git a/src/components/ShellForms/ShellForms.tsx b/src/components/ShellForms/ShellForms.tsx index 93b3cb0..a46a581 100644 --- a/src/components/ShellForms/ShellForms.tsx +++ b/src/components/ShellForms/ShellForms.tsx @@ -268,9 +268,11 @@ export class ShellForms extends React.PureComponent { const {props} = this; return( - + Shell {props.index + 1} @@ -329,11 +331,11 @@ export class ShellForms extends React.PureComponent { }> - + - diff --git a/src/components/SupportFooter/SupportFooter.css b/src/components/SupportFooter/SupportFooter.css index 54c2753..78f266f 100644 --- a/src/components/SupportFooter/SupportFooter.css +++ b/src/components/SupportFooter/SupportFooter.css @@ -2,7 +2,7 @@ padding-top: 1rem; padding-bottom: 5rem; color: white; - background-color: #212529; + background-color: var(--blue-c3); display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } @@ -14,7 +14,7 @@ .support-link{ color: white; - background-color: #212529; + background-color: var(--blue-c3); background-clip: content-box; padding-left: 25%; padding-right: 25%; @@ -23,6 +23,6 @@ } .support-link:hover{ - color: black; + color: var(--blue-c3); background-color: white; } \ No newline at end of file diff --git a/src/components/TargetForms/TargetForms.tsx b/src/components/TargetForms/TargetForms.tsx index 4dc4af5..52fe74d 100644 --- a/src/components/TargetForms/TargetForms.tsx +++ b/src/components/TargetForms/TargetForms.tsx @@ -28,7 +28,9 @@ class RefAngleForm extends React.PureComponent{ style={{padding: 0, paddingTop: '0.25rem', paddingRight: '0.25rem', paddingLeft: '0.25rem'}} > Label {props.index + 1} @@ -69,7 +71,7 @@ class AngleForm extends React.PureComponent{ private commonStyle = Object.freeze({ formControl: {minWidth: '50%', maxWidth: '7rem', display: "inline-flex"}, formGroup: {flexFlow: 'unset', padding: 0, marginBottom: '.5rem'}, - formLabel: {backgroundColor: '#0f64f2', color: 'white', fontSize: '1.25rem', paddingTop: '.25rem', paddingBottom: '.25rem'} + formLabel: {backgroundColor: 'var(--blue-c4)', color: 'white', fontSize: '1.25rem', paddingTop: '.25rem', paddingBottom: '.25rem'} }); render(){ const {props} = this; diff --git a/src/components/UtilityComponents/DownloadButton.tsx b/src/components/UtilityComponents/DownloadButton.tsx index fd88321..fece592 100644 --- a/src/components/UtilityComponents/DownloadButton.tsx +++ b/src/components/UtilityComponents/DownloadButton.tsx @@ -14,7 +14,7 @@ export class DownloadButton extends React.Component<{updateData: Function, label const {state, props} = this; return ( - + ); }