Files
astuto/app/javascript/components/shared/CustomTexts.tsx
Riccardo Graziosi dad382d2b1 Post follow and updates notifications V1 (#111)
* It is now possible to follow a post in order to receive updates about it
* Notifications are now sent when updates are published
* Post status changes are now tracked
* Update sidebar now shows the post status history
* Mark a comment as a post update using the comment form
* ... more ...
2022-05-28 11:03:36 +02:00

53 lines
1.3 KiB
TypeScript

import * as React from 'react';
interface Props {
children: string;
}
interface DescriptionTextProps {
children: string;
limit?: number;
}
export const TitleText = ({ children }: Props) => (
<span className="titleText">{children}</span>
);
export const BoxTitleText = ({ children }: Props) => (
<span className="boxTitleText">{children}</span>
);
export const MutedText = ({ children }: Props) => (
<span className="mutedText">{children}</span>
);
export const CenteredMutedText = ({ children }: Props) => (
<p className="centeredText"><span className="mutedText">{children}</span></p>
);
export const SmallMutedText = ({ children }: Props) => (
<p className="smallMutedText">{children}</p>
);
export const UppercaseText = ({ children }: Props) => (
<span className="uppercaseText">{children}</span>
);
export const SuccessText = ({ children }: Props) => (
<span className="successText">{children}</span>
);
export const DangerText = ({ children }: Props) => (
<span className="dangerText">{children}</span>
);
export const DescriptionText = ({ children, limit = 90}: DescriptionTextProps) => (
<span className="descriptionText">
{
children && children.length > limit ?
children.slice(0, limit-1) + '...'
:
children || '<No description provided>'
}
</span>
);