2019-09-15 18:26:51 +02:00
|
|
|
import * as React from 'react';
|
|
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
|
children: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface DescriptionTextProps {
|
|
|
|
|
children: string;
|
|
|
|
|
limit?: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const TitleText = ({ children }: Props) => (
|
2019-09-16 12:22:30 +02:00
|
|
|
<span className="titleText">{children}</span>
|
2019-09-15 18:26:51 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
export const MutedText = ({ children }: Props) => (
|
2019-09-16 12:22:30 +02:00
|
|
|
<span className="mutedText">{children}</span>
|
2019-09-15 18:26:51 +02:00
|
|
|
);
|
|
|
|
|
|
2019-09-19 16:42:43 +02:00
|
|
|
export const CenteredMutedText = ({ children }: Props) => (
|
|
|
|
|
<p className="centeredText"><span className="mutedText">{children}</span></p>
|
|
|
|
|
);
|
|
|
|
|
|
2019-09-15 18:26:51 +02:00
|
|
|
export const UppercaseText = ({ children }: Props) => (
|
2019-09-16 12:22:30 +02:00
|
|
|
<span className="uppercaseText">{children}</span>
|
2019-09-15 18:26:51 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
export const SuccessText = ({ children }: Props) => (
|
2019-09-16 12:22:30 +02:00
|
|
|
<span className="successText">{children}</span>
|
2019-09-15 18:26:51 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
export const DangerText = ({ children }: Props) => (
|
2019-09-16 12:22:30 +02:00
|
|
|
<span className="dangerText">{children}</span>
|
2019-09-15 18:26:51 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
export const DescriptionText = ({ children, limit = 90}: DescriptionTextProps) => (
|
2019-09-16 12:22:30 +02:00
|
|
|
<span className="descriptionText">
|
2019-09-15 18:26:51 +02:00
|
|
|
{
|
|
|
|
|
children && children.length > limit ?
|
|
|
|
|
children.slice(0, limit-1) + '...'
|
|
|
|
|
:
|
|
|
|
|
children || '<No description provided>'
|
|
|
|
|
}
|
|
|
|
|
</span>
|
|
|
|
|
);
|