mirror of
https://github.com/billsonnn/nitro-react.git
synced 2025-01-19 05:46:27 +01:00
Changes
This commit is contained in:
parent
5d4ab54c8c
commit
783f805907
@ -123,7 +123,7 @@ export class NotificationUtilities
|
||||
dispatchUiEvent(new NotificationConfirmEvent(type, this.cleanText(message), onConfirm, onCancel, confirmText, cancelText, title));
|
||||
}
|
||||
|
||||
public static simpleAlert(message: string, type: string, clickUrl: string = null, clickUrlText: string = null, title: string = null, imageUrl: string = null): void
|
||||
public static simpleAlert(message: string, type: string = null, clickUrl: string = null, clickUrlText: string = null, title: string = null, imageUrl: string = null): void
|
||||
{
|
||||
if(!title || !title.length) title = LocalizeText('notifications.broadcast.title');
|
||||
|
||||
|
@ -1,16 +1,12 @@
|
||||
.nitro-room-tools {
|
||||
position: absolute;
|
||||
bottom: 125px;
|
||||
left: -145px;
|
||||
bottom: $toolbar-height + 65px;
|
||||
left: 0;
|
||||
background: rgba($dark,.95);
|
||||
box-shadow: inset 0px 5px lighten(rgba($dark,.6),2.5), inset 0 -4px darken(rgba($dark,.6),4);
|
||||
border-top-right-radius: $border-radius;
|
||||
border-bottom-right-radius: $border-radius;
|
||||
transition: all .2s ease;
|
||||
|
||||
&.open {
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
.list-group-item {
|
||||
background: transparent;
|
||||
|
@ -1,10 +1,24 @@
|
||||
import { FC, useMemo } from 'react';
|
||||
import { CSSProperties, FC, useMemo } from 'react';
|
||||
import { GetConfiguration } from '../../../api';
|
||||
import { CurrencyIconProps } from './CurrencyIcon.types';
|
||||
import { Base, BaseProps } from '../../../common/Base';
|
||||
|
||||
export interface CurrencyIconProps extends BaseProps<HTMLDivElement>
|
||||
{
|
||||
type: number | string;
|
||||
}
|
||||
|
||||
export const CurrencyIcon: FC<CurrencyIconProps> = props =>
|
||||
{
|
||||
const { type = '', className = '', style = {}, ...rest } = props;
|
||||
const { type = '', classNames = [], style = {}, ...rest } = props;
|
||||
|
||||
const getClassNames = useMemo(() =>
|
||||
{
|
||||
const newClassNames: string[] = [ 'nitro-currency-icon' ];
|
||||
|
||||
if(classNames.length) newClassNames.push(...classNames);
|
||||
|
||||
return newClassNames;
|
||||
}, [ classNames ]);
|
||||
|
||||
const urlString = useMemo(() =>
|
||||
{
|
||||
@ -15,7 +29,16 @@ export const CurrencyIcon: FC<CurrencyIconProps> = props =>
|
||||
return `url(${ url })`;
|
||||
}, [ type ]);
|
||||
|
||||
return (
|
||||
<div className={ 'nitro-currency-icon ' + className } style={ { ...style, backgroundImage: urlString } } { ...rest } />
|
||||
);
|
||||
const getStyle = useMemo(() =>
|
||||
{
|
||||
let newStyle: CSSProperties = {};
|
||||
|
||||
newStyle.backgroundImage = urlString;
|
||||
|
||||
if(Object.keys(style).length) newStyle = { ...newStyle, ...style };
|
||||
|
||||
return newStyle;
|
||||
}, [ style, urlString ]);
|
||||
|
||||
return <Base classNames={ getClassNames } style={ getStyle } { ...rest } />
|
||||
}
|
||||
|
@ -1,6 +0,0 @@
|
||||
import { DetailsHTMLAttributes } from 'react';
|
||||
|
||||
export interface CurrencyIconProps extends DetailsHTMLAttributes<HTMLDivElement>
|
||||
{
|
||||
type: number | string;
|
||||
}
|
Loading…
Reference in New Issue
Block a user