mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-10-22 19:26:13 +02:00
Removing all unused versions of PRIMARY and SECONDARY colors in codebase (#14121)
Co-authored-by: David Walsh <davidwalsh83@gmail.com>
This commit is contained in:
parent
1edc475d3e
commit
548a7e21e4
@ -35,7 +35,11 @@ import {
|
|||||||
import { getLedgerTransportType } from '../../../ducks/metamask/metamask';
|
import { getLedgerTransportType } from '../../../ducks/metamask/metamask';
|
||||||
import { attemptLedgerTransportCreation } from '../../../store/actions';
|
import { attemptLedgerTransportCreation } from '../../../store/actions';
|
||||||
|
|
||||||
const renderInstructionStep = (text, show = true, color = COLORS.PRIMARY3) => {
|
const renderInstructionStep = (
|
||||||
|
text,
|
||||||
|
show = true,
|
||||||
|
color = COLORS.PRIMARY_DEFAULT,
|
||||||
|
) => {
|
||||||
return (
|
return (
|
||||||
show && (
|
show && (
|
||||||
<Typography
|
<Typography
|
||||||
@ -198,7 +202,7 @@ export default function LedgerInstructionField({ showDataInstruction }) {
|
|||||||
usingWebHID &&
|
usingWebHID &&
|
||||||
webHidConnectedStatus ===
|
webHidConnectedStatus ===
|
||||||
WEBHID_CONNECTED_STATUSES.NOT_CONNECTED,
|
WEBHID_CONNECTED_STATUSES.NOT_CONNECTED,
|
||||||
COLORS.SECONDARY1,
|
COLORS.SECONDARY_DEFAULT,
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
@ -13,7 +13,7 @@ const SECTIONS = {
|
|||||||
props: {
|
props: {
|
||||||
margin: 4,
|
margin: 4,
|
||||||
padding: 8,
|
padding: 8,
|
||||||
borderColor: COLORS.PRIMARY1,
|
borderColor: COLORS.PRIMARY_DEFAULT,
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
|
@ -91,15 +91,3 @@ import Box from '../ui/box';
|
|||||||
<Typography color={COLORS.TEXT_DEFAULT}>COLORS.BORDER_DEFAULT</Typography>
|
<Typography color={COLORS.TEXT_DEFAULT}>COLORS.BORDER_DEFAULT</Typography>
|
||||||
</Box>;
|
</Box>;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Deprecated Colors
|
|
||||||
|
|
||||||
List of deprecated background and border color props that are not theme compatible and should not be used.
|
|
||||||
|
|
||||||
```js
|
|
||||||
/** !!! DEPRECATED DO NOT USE!!! */
|
|
||||||
PRIMARY1: 'primary-1',
|
|
||||||
PRIMARY3: 'primary-3',
|
|
||||||
SECONDARY1: 'secondary-1',
|
|
||||||
SECONDARY3: 'secondary-3',
|
|
||||||
```
|
|
||||||
|
@ -25,7 +25,7 @@ export default {
|
|||||||
type: 'select',
|
type: 'select',
|
||||||
},
|
},
|
||||||
options: COLORS,
|
options: COLORS,
|
||||||
defaultValue: COLORS.PRIMARY1,
|
defaultValue: COLORS.PRIMARY_DEFAULT,
|
||||||
},
|
},
|
||||||
borderColor: {
|
borderColor: {
|
||||||
control: {
|
control: {
|
||||||
|
@ -108,18 +108,6 @@ import { COLORS} from '../../../helpers/constants/design-system';
|
|||||||
</Typography>
|
</Typography>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Deprecated Colors
|
|
||||||
|
|
||||||
List of deprecated color props that are not theme compatible and should not be used.
|
|
||||||
|
|
||||||
```js
|
|
||||||
/** !!! DEPRECATED DO NOT USE!!! */
|
|
||||||
PRIMARY1: 'primary-1',
|
|
||||||
PRIMARY3: 'primary-3',
|
|
||||||
SECONDARY1: 'secondary-1',
|
|
||||||
SECONDARY3: 'secondary-3',
|
|
||||||
```
|
|
||||||
|
|
||||||
### Font Weight
|
### Font Weight
|
||||||
|
|
||||||
Use the `fontWeight` prop and the `FONT_WEIGHT` object from `./ui/helpers/constants/design-system.js` to change the font weight of the Typography component. There are 2 font weights:
|
Use the `fontWeight` prop and the `FONT_WEIGHT` object from `./ui/helpers/constants/design-system.js` to change the font weight of the Typography component. There are 2 font weights:
|
||||||
|
@ -29,13 +29,6 @@ export const ValidColors = [
|
|||||||
COLORS.WARNING_INVERSE,
|
COLORS.WARNING_INVERSE,
|
||||||
COLORS.INFO_DEFAULT,
|
COLORS.INFO_DEFAULT,
|
||||||
COLORS.INFO_INVERSE,
|
COLORS.INFO_INVERSE,
|
||||||
/**
|
|
||||||
* COLORS BELOW HAVE BEEN DEPRECATED
|
|
||||||
*/
|
|
||||||
COLORS.PRIMARY1,
|
|
||||||
COLORS.PRIMARY3,
|
|
||||||
COLORS.SECONDARY1,
|
|
||||||
COLORS.SECONDARY3,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export const ValidTags = [
|
export const ValidTags = [
|
||||||
|
@ -53,13 +53,6 @@ export const COLORS = {
|
|||||||
GOERLI: 'goerli',
|
GOERLI: 'goerli',
|
||||||
TRANSPARENT: 'transparent',
|
TRANSPARENT: 'transparent',
|
||||||
LOCALHOST: 'localhost',
|
LOCALHOST: 'localhost',
|
||||||
/**
|
|
||||||
* !!! DEPRECATED DO NOT USE!!!
|
|
||||||
*/
|
|
||||||
PRIMARY1: 'primary-1',
|
|
||||||
PRIMARY3: 'primary-3',
|
|
||||||
SECONDARY1: 'secondary-1',
|
|
||||||
SECONDARY3: 'secondary-3',
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const TYPOGRAPHY = {
|
export const TYPOGRAPHY = {
|
||||||
|
Loading…
Reference in New Issue
Block a user