1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-01 21:57:06 +01:00

Updates to stories and component (#15357)

* Updates to stories and component

* removed SECONDARY color options

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
This commit is contained in:
Nidhi Kumari 2022-07-27 22:16:13 +05:30 committed by GitHub
parent 73cd2b0306
commit e12d0a94e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,27 +25,18 @@ export const BackgroundColors = [
COLORS.PRIMARY_DEFAULT, COLORS.PRIMARY_DEFAULT,
COLORS.PRIMARY_ALTERNATIVE, COLORS.PRIMARY_ALTERNATIVE,
COLORS.PRIMARY_MUTED, COLORS.PRIMARY_MUTED,
COLORS.PRIMARY_DISABLED,
COLORS.SECONDARY_DEFAULT,
COLORS.SECONDARY_ALTERNATIVE,
COLORS.SECONDARY_MUTED,
COLORS.SECONDARY_DISABLED,
COLORS.ERROR_DEFAULT, COLORS.ERROR_DEFAULT,
COLORS.ERROR_ALTERNATIVE, COLORS.ERROR_ALTERNATIVE,
COLORS.ERROR_MUTED, COLORS.ERROR_MUTED,
COLORS.ERROR_DISABLED,
COLORS.WARNING_DEFAULT, COLORS.WARNING_DEFAULT,
COLORS.WARNING_ALTERNATIVE, COLORS.WARNING_ALTERNATIVE,
COLORS.WARNING_MUTED, COLORS.WARNING_MUTED,
COLORS.WARNING_DISABLED,
COLORS.SUCCESS_DEFAULT, COLORS.SUCCESS_DEFAULT,
COLORS.SUCCESS_ALTERNATIVE, COLORS.SUCCESS_ALTERNATIVE,
COLORS.SUCCESS_MUTED, COLORS.SUCCESS_MUTED,
COLORS.SUCCESS_DISABLED,
COLORS.INFO_DEFAULT, COLORS.INFO_DEFAULT,
COLORS.INFO_ALTERNATIVE, COLORS.INFO_ALTERNATIVE,
COLORS.INFO_MUTED, COLORS.INFO_MUTED,
COLORS.INFO_DISABLED,
COLORS.MAINNET, COLORS.MAINNET,
COLORS.ROPSTEN, COLORS.ROPSTEN,
COLORS.KOVAN, COLORS.KOVAN,
@ -60,27 +51,18 @@ export const BorderColors = [
COLORS.PRIMARY_DEFAULT, COLORS.PRIMARY_DEFAULT,
COLORS.PRIMARY_ALTERNATIVE, COLORS.PRIMARY_ALTERNATIVE,
COLORS.PRIMARY_MUTED, COLORS.PRIMARY_MUTED,
COLORS.PRIMARY_DISABLED,
COLORS.SECONDARY_DEFAULT,
COLORS.SECONDARY_ALTERNATIVE,
COLORS.SECONDARY_MUTED,
COLORS.SECONDARY_DISABLED,
COLORS.ERROR_DEFAULT, COLORS.ERROR_DEFAULT,
COLORS.ERROR_ALTERNATIVE, COLORS.ERROR_ALTERNATIVE,
COLORS.ERROR_MUTED, COLORS.ERROR_MUTED,
COLORS.ERROR_DISABLED,
COLORS.WARNING_DEFAULT, COLORS.WARNING_DEFAULT,
COLORS.WARNING_ALTERNATIVE, COLORS.WARNING_ALTERNATIVE,
COLORS.WARNING_MUTED, COLORS.WARNING_MUTED,
COLORS.WARNING_DISABLED,
COLORS.SUCCESS_DEFAULT, COLORS.SUCCESS_DEFAULT,
COLORS.SUCCESS_ALTERNATIVE, COLORS.SUCCESS_ALTERNATIVE,
COLORS.SUCCESS_MUTED, COLORS.SUCCESS_MUTED,
COLORS.SUCCESS_DISABLED,
COLORS.INFO_DEFAULT, COLORS.INFO_DEFAULT,
COLORS.INFO_ALTERNATIVE, COLORS.INFO_ALTERNATIVE,
COLORS.INFO_MUTED, COLORS.INFO_MUTED,
COLORS.INFO_DISABLED,
COLORS.MAINNET, COLORS.MAINNET,
COLORS.ROPSTEN, COLORS.ROPSTEN,
COLORS.KOVAN, COLORS.KOVAN,
@ -245,6 +227,7 @@ export default function Box({
children, children,
className, className,
backgroundColor, backgroundColor,
...props
}) { }) {
const boxClassName = classnames( const boxClassName = classnames(
BASE_CLASS_NAME, BASE_CLASS_NAME,
@ -301,7 +284,11 @@ export default function Box({
if (typeof children === 'function') { if (typeof children === 'function') {
return children(boxClassName); return children(boxClassName);
} }
return <div className={boxClassName}>{children}</div>; return (
<div className={boxClassName} {...props}>
{children}
</div>
);
} }
Box.propTypes = { Box.propTypes = {