Add Notification icon w/ stroke
This commit is contained in:
parent
af46278539
commit
cc3f7d1c09
@ -6,6 +6,8 @@ import {
|
||||
AddressConnectorIcon,
|
||||
ArrowIcon,
|
||||
Bar3Icon,
|
||||
BellIcon,
|
||||
BellStrokeIcon,
|
||||
BoxCloseIcon,
|
||||
CalculatorIcon,
|
||||
CaretIcon,
|
||||
@ -71,6 +73,8 @@ export enum IconName {
|
||||
AddressConnector = 'AddressConnector',
|
||||
Arrow = 'Arrow',
|
||||
Bar3 = 'Bar3',
|
||||
Bell = 'Bell',
|
||||
BellStroked = 'BellStroked',
|
||||
BoxClose = 'BoxClose',
|
||||
Calculator = 'Calculator',
|
||||
Caret = 'Caret',
|
||||
@ -137,6 +141,8 @@ const icons = {
|
||||
[IconName.AddressConnector]: AddressConnectorIcon,
|
||||
[IconName.Arrow]: ArrowIcon,
|
||||
[IconName.Bar3]: Bar3Icon,
|
||||
[IconName.Bell]: BellIcon,
|
||||
[IconName.BellStroked]: BellStrokeIcon,
|
||||
[IconName.BoxClose]: BoxCloseIcon,
|
||||
[IconName.Calculator]: CalculatorIcon,
|
||||
[IconName.Caret]: CaretIcon,
|
||||
@ -213,7 +219,8 @@ export const Icon = styled(
|
||||
iconComponent: Component = iconName && icons[iconName],
|
||||
className,
|
||||
...props
|
||||
}: ElementProps & StyleProps) => (Component ? <Component className={className} {...props} /> : null)
|
||||
}: ElementProps & StyleProps) =>
|
||||
Component ? <Component className={className} {...props} /> : null
|
||||
)`
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
|
||||
@ -69,7 +69,7 @@ export const notificationTypes = [
|
||||
<OrderStatusIcon status={order.status} totalFilled={order.totalFilled ?? 0} />
|
||||
),
|
||||
title: `${stringGetter({
|
||||
key: TRADE_TYPE_STRINGS[order.type.rawValue as TradeTypes].tradeTypeKey,
|
||||
key: TRADE_TYPE_STRINGS[order.type.rawValue as TradeTypes]?.tradeTypeKey,
|
||||
})} ${
|
||||
order.status === AbacusOrderStatus.open && (order?.totalFilled ?? 0) > 0
|
||||
? stringGetter({ key: STRING_KEYS.PARTIALLY_FILLED })
|
||||
@ -138,7 +138,8 @@ export const notificationTypes = [
|
||||
{stringGetter({
|
||||
key: STRING_KEYS.SOMETHING_WENT_WRONG_WITH_MESSAGE,
|
||||
params: {
|
||||
ERROR_MESSAGE: error.message || stringGetter({ key: STRING_KEYS.UNKNOWN_ERROR }),
|
||||
ERROR_MESSAGE:
|
||||
error.message || stringGetter({ key: STRING_KEYS.UNKNOWN_ERROR }),
|
||||
},
|
||||
})}
|
||||
</Styled.ErrorMessage>
|
||||
@ -182,8 +183,8 @@ Styled.TransferText = styled.span`
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5ch;
|
||||
`
|
||||
`;
|
||||
|
||||
Styled.ErrorMessage = styled.div`
|
||||
max-width: 13rem;
|
||||
`;
|
||||
`;
|
||||
|
||||
3
src/icons/bell-stroke.svg
Normal file
3
src/icons/bell-stroke.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="16" height="18" viewBox="0 0 16 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.3811 13.235C11.9338 13.0512 13.4593 12.6847 14.9261 12.1433C13.6839 10.7673 12.9975 8.97875 13.0003 7.125V6.54167V6.5C13.0003 5.17392 12.4735 3.90215 11.5358 2.96447C10.5981 2.02678 9.32636 1.5 8.00028 1.5C6.67419 1.5 5.40242 2.02678 4.46474 2.96447C3.52706 3.90215 3.00028 5.17392 3.00028 6.5V7.125C3.00279 8.97886 2.3161 10.7675 1.07361 12.1433C2.51778 12.6767 4.04027 13.0475 5.61944 13.235M10.3811 13.235C8.79943 13.4226 7.20112 13.4226 5.61944 13.235M10.3811 13.235C10.5012 13.6099 10.5311 14.0078 10.4683 14.3964C10.4055 14.785 10.2518 15.1533 10.0198 15.4713C9.78772 15.7893 9.48386 16.048 9.13293 16.2263C8.78201 16.4047 8.39392 16.4976 8.00028 16.4976C7.60663 16.4976 7.21854 16.4047 6.86762 16.2263C6.51669 16.048 6.21283 15.7893 5.98079 15.4713C5.74875 15.1533 5.59508 14.785 5.53229 14.3964C5.46949 14.0078 5.49936 13.6099 5.61944 13.235" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 24"><path fill="currentColor" d="M11 0C8.5 0 6.101.948 4.333 2.636 2.565 4.324 1.57 6.613 1.57 9v5.379l-1.11 1.06c-.22.21-.37.477-.43.768-.061.291-.03.593.089.867s.32.508.578.673c.259.165.562.253.873.253h18.86c.31 0 .614-.088.873-.253.258-.165.46-.399.578-.673.12-.274.15-.576.09-.867a1.48 1.48 0 0 0-.43-.768l-1.111-1.06V9c0-2.387-.993-4.676-2.762-6.364C15.9.948 13.501 0 11 0Zm0 24a4.83 4.83 0 0 1-3.334-1.318 4.399 4.399 0 0 1-1.38-3.182h9.428a4.399 4.399 0 0 1-1.38 3.182A4.83 4.83 0 0 1 11 24Z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 24"><path fill="currentColor" d="M11 0C8.5 0 6.101.948 4.333 2.636 2.565 4.324 1.57 6.613 1.57 9v5.379l-1.11 1.06c-.22.21-.37.477-.43.768-.061.291-.03.593.089.867s.32.508.578.673c.259.165.562.253.873.253h18.86c.31 0 .614-.088.873-.253.258-.165.46-.399.578-.673.12-.274.15-.576.09-.867a1.48 1.48 0 0 0-.43-.768l-1.111-1.06V9c0-2.387-.993-4.676-2.762-6.364C15.9.948 13.501 0 11 0Zm0 24a4.83 4.83 0 0 1-3.334-1.318 4.399 4.399 0 0 1-1.38-3.182h9.428a4.399 4.399 0 0 1-1.38 3.182A4.83 4.83 0 0 1 11 24Z"/></svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 563 B After Width: | Height: | Size: 564 B |
@ -2,6 +2,7 @@ export { default as AddressConnectorIcon } from './address-connector.svg';
|
||||
export { default as ArrowIcon } from './arrow.svg';
|
||||
export { default as Bar3Icon } from './bar3.svg';
|
||||
export { default as BellIcon } from './bell.svg';
|
||||
export { default as BellStrokeIcon } from './bell-stroke.svg';
|
||||
export { default as BoxCloseIcon } from './box-close.svg';
|
||||
export { default as CalculatorIcon } from './calculator.svg';
|
||||
export { default as CaretIcon } from './caret-down.svg';
|
||||
|
||||
@ -7,7 +7,7 @@ import { DialogTypes } from '@/constants/dialogs';
|
||||
import { STRING_KEYS } from '@/constants/localization';
|
||||
import { AppRoute } from '@/constants/routes';
|
||||
import { useStringGetter } from '@/hooks';
|
||||
import { LogoShortIcon, BellIcon } from '@/icons';
|
||||
import { LogoShortIcon, BellStrokeIcon } from '@/icons';
|
||||
|
||||
import { Icon, IconName } from '@/components/Icon';
|
||||
import { IconButton } from '@/components/IconButton';
|
||||
@ -131,7 +131,9 @@ export const HeaderDesktop = () => {
|
||||
<VerticalSeparator />
|
||||
|
||||
<NotificationsMenu
|
||||
slotTrigger={<Styled.IconButton shape={ButtonShape.Rectangle} iconComponent={BellIcon} />}
|
||||
slotTrigger={
|
||||
<Styled.IconButton shape={ButtonShape.Rectangle} iconComponent={BellStrokeIcon} />
|
||||
}
|
||||
/>
|
||||
|
||||
<VerticalSeparator />
|
||||
@ -165,7 +167,7 @@ Styled.Header = styled.header`
|
||||
)
|
||||
var(--border-width) 1fr var(--border-width) auto;
|
||||
|
||||
font-size: 0.9375em;
|
||||
font-size: 0.9375rem;
|
||||
|
||||
:before {
|
||||
backdrop-filter: blur(10px);
|
||||
@ -214,7 +216,8 @@ Styled.NavAfter = styled.div`
|
||||
}
|
||||
`;
|
||||
|
||||
Styled.IconButton = styled(IconButton)`
|
||||
Styled.IconButton = styled(IconButton)<{ size?: string }>`
|
||||
${headerMixins.button}
|
||||
--button-border: none;
|
||||
--button-icon-size: 1rem;
|
||||
`;
|
||||
|
||||
@ -178,10 +178,11 @@ export const NotificationsMenu = ({
|
||||
};
|
||||
|
||||
const $UnreadIndicator = styled.div`
|
||||
width: 0.5em;
|
||||
height: 0.5em;
|
||||
width: 0.5rem;
|
||||
height: 0.5rem;
|
||||
border-radius: 50%;
|
||||
background-color: var(--color-accent);
|
||||
border: 1px solid var(--color-layer-2);
|
||||
`;
|
||||
|
||||
const $TriggerContainer = styled.div`
|
||||
@ -192,8 +193,8 @@ const $TriggerUnreadIndicator = styled($UnreadIndicator)`
|
||||
place-self: center;
|
||||
|
||||
position: relative;
|
||||
right: -0.425em;
|
||||
top: -0.425em;
|
||||
right: -0.2rem;
|
||||
top: -0.325rem;
|
||||
`;
|
||||
|
||||
const $Output = styled(Output)`
|
||||
|
||||
Loading…
Reference in New Issue
Block a user