mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 03:37:56 +01:00
* 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 ...
53 lines
1.3 KiB
TypeScript
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>
|
|
); |