signal-desktop/ts/components/BadgeDescription.stories.tsx

38 lines
835 B
TypeScript
Raw Normal View History

2021-11-02 23:01:13 +00:00
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import React from 'react';
import { BadgeDescription } from './BadgeDescription';
2022-06-07 00:48:02 +00:00
export default {
title: 'Components/BadgeDescription',
};
2021-11-02 23:01:13 +00:00
2022-11-18 00:45:19 +00:00
export function NormalName(): JSX.Element {
return (
<BadgeDescription
template="{short_name} is here! Hello, {short_name}! {short_name}, I think you're great. This is not replaced: {not_replaced}"
firstName="Alice"
title="Should not be seen"
/>
);
}
2021-11-02 23:01:13 +00:00
2022-06-07 00:48:02 +00:00
NormalName.story = {
name: 'Normal name',
};
2022-11-18 00:45:19 +00:00
export function NameWithRtlOverrides(): JSX.Element {
return (
<BadgeDescription
template="Hello, {short_name}! {short_name}, I think you're great."
title={'Flip-\u202eflop'}
/>
);
}
2022-06-07 00:48:02 +00:00
NameWithRtlOverrides.story = {
name: 'Name with RTL overrides',
};