Skip to content

Commit

Permalink
feat(ux): use secondary accent color for status UI (#2055)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ross Bulat authored Apr 2, 2024
1 parent b536faf commit bf16d80
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 23 deletions.
4 changes: 2 additions & 2 deletions src/canvas/JoinPool/Wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ export const TitleWrapper = styled.div`
font-size: 1.1rem;
&.blocked {
color: var(--status-warning-color);
border-color: var(--status-warning-color);
color: var(--accent-color-secondary);
border-color: var(--accent-color-secondary);
}
&.destroying {
Expand Down
2 changes: 1 addition & 1 deletion src/library/Card/Wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const CardWrapper = styled.div<CardWrapperProps>`
}
&.warning {
border: 1px solid var(--status-warning-color);
border: 1px solid var(--accent-color-secondary);
}
&.prompt {
Expand Down
13 changes: 7 additions & 6 deletions src/library/Form/Warning/Wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,23 @@
import styled from 'styled-components';

export const Wrapper = styled.div`
background: var(--background-warning);
border: 1px solid var(--status-warning-color-transparent);
background: var(--button-primary-background);
border: 1px solid var(--accent-color-secondary);
margin: 0.5rem 0;
padding: 0.75rem 0.75rem;
padding: 0.6rem 0.9rem;
border-radius: 0.75rem;
display: flex;
flex-flow: row wrap;
align-items: center;
width: 100%;
> h4 {
color: var(--status-warning-color);
color: var(--accent-color-secondary);
font-family: Inter, sans-serif;
.icon {
color: var(--status-warning-color);
margin-right: 0.6rem;
color: var(--accent-color-secondary);
margin-right: 0.5rem;
}
}
`;
7 changes: 1 addition & 6 deletions src/library/Form/Warning/index.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
// Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors
// SPDX-License-Identifier: GPL-3.0-only

import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import type { WarningProps } from '../types';
import { Wrapper } from './Wrapper';

export const Warning = ({ text }: WarningProps) => (
<Wrapper>
<h4>
<FontAwesomeIcon icon={faExclamationTriangle} className="icon" />
{text}
</h4>
<h4>{text}</h4>
</Wrapper>
);
4 changes: 2 additions & 2 deletions src/library/Pool/Rewards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const RewardsGraph = ({ points = [], syncing }: RewardsGraphProps) => {
key={`line_coord_${index}`}
strokeWidth={5}
opacity={1}
stroke="var(--accent-color-tertiary)"
stroke="var(--accent-color-transparent)"
x1={x1}
y1={y1}
x2={x2}
Expand All @@ -146,7 +146,7 @@ export const RewardsGraph = ({ points = [], syncing }: RewardsGraphProps) => {
stroke={
zero
? 'var(--text-color-tertiary)'
: 'var(--accent-color-secondary)'
: 'var(--accent-color-primary)'
}
x1={x1}
y1={y1}
Expand Down
8 changes: 4 additions & 4 deletions src/library/SideMenu/Primary/Wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const Wrapper = styled(motion.div)`
border: 1px solid var(--accent-color-primary);
}
&.warning {
border: 1px solid var(--status-warning-color);
border: 1px solid var(--accent-color-secondary);
}
}
Expand Down Expand Up @@ -68,8 +68,8 @@ export const Wrapper = styled(motion.div)`
border: 1px solid var(--accent-color-primary);
}
&.warning {
color: var(--status-warning-color);
border: 1px solid var(--status-warning-color-transparent);
color: var(--accent-color-secondary);
border: 1px solid var(--accent-color-secondary);
}
border-radius: 0.5rem;
padding: 0.15rem 0.5rem;
Expand All @@ -82,7 +82,7 @@ export const Wrapper = styled(motion.div)`
}
&.warning {
svg {
color: var(--status-warning-color);
color: var(--accent-color-secondary);
}
}
&.minimised {
Expand Down
2 changes: 0 additions & 2 deletions src/theme/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ SPDX-License-Identifier: GPL-3.0-only */
--background-canvas-card-secondary: rgb(255 255 255 / 35%);
--background-floating-card: rgb(255 255 255 / 90%);
--background-app-footer: rgb(244 225 225 / 75%);
--background-warning: #fdf9eb;
--background-modal: #f9f7f7;
--background-modal-footer: #efefef;
--background-status-overlay: rgb(255 255 255 / 85%);
Expand Down Expand Up @@ -91,7 +90,6 @@ SPDX-License-Identifier: GPL-3.0-only */
--background-canvas-card-secondary: rgb(44 40 44 / 35%);
--background-floating-card: rgb(43 38 43 / 95%);
--background-app-footer: #262327;
--background-warning: #33332a;
--background-modal: rgb(43 38 43);
--background-modal-footer: rgb(37 32 37);
--background-status-overlay: rgb(43 38 43 / 75%);
Expand Down

0 comments on commit bf16d80

Please sign in to comment.