mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-17 04:53:49 +00:00
Updated Result component so that it has the text centered by default
This commit is contained in:
@@ -6,20 +6,18 @@ import { SimpleCard } from './SimpleCard';
|
||||
interface ResultProps {
|
||||
type: 'success' | 'error' | 'warning';
|
||||
className?: string;
|
||||
textCentered?: boolean;
|
||||
small?: boolean;
|
||||
}
|
||||
|
||||
export const Result: FC<ResultProps> = ({ children, type, className, textCentered = false, small = false }) => (
|
||||
export const Result: FC<ResultProps> = ({ children, type, className, small = false }) => (
|
||||
<Row className={className}>
|
||||
<div className={classNames({ 'col-md-10 offset-md-1': !small, 'col-12': small })}>
|
||||
<SimpleCard
|
||||
className={classNames({
|
||||
className={classNames('text-center', {
|
||||
'bg-main': type === 'success',
|
||||
'bg-danger': type === 'error',
|
||||
'bg-warning': type === 'warning',
|
||||
'text-white': type !== 'warning',
|
||||
'text-center': textCentered,
|
||||
})}
|
||||
bodyClassName={classNames({ 'p-2': small })}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user