Skip to content

Commit

Permalink
Merge pull request #10 from vitalics/fmt
Browse files Browse the repository at this point in the history
new component - text
  • Loading branch information
vitalics authored Sep 16, 2023
2 parents b76daee + 4bd2713 commit 1bfdd6d
Show file tree
Hide file tree
Showing 95 changed files with 2,691 additions and 3,908 deletions.
34 changes: 0 additions & 34 deletions packages/fmt/__tests__/bold.test.ts

This file was deleted.

57 changes: 0 additions & 57 deletions packages/fmt/__tests__/cash.test.ts

This file was deleted.

20 changes: 12 additions & 8 deletions packages/fmt/bin.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
import { Fragment, h } from 'preact';
import { Telegraf } from 'telegraf';

import { Bold, Break, render, Spoiler } from './react';
import { render, Text } from './src';
import Break from './src/Break';
import Mention from './src/mention';

const TOKEN = '';
const bot = new Telegraf(TOKEN);

bot.start(ctx => {
ctx.reply(...render(
<Fragment>
<Bold>Some bold texts</Bold>
bot.start(async ctx => {
await ctx.reply(...render(
<>
<Text.Bold>Some bold texts</Text.Bold>
<Break />
Spoiler is <Spoiler>spoiler</Spoiler>
</Fragment>
Spoiler is <Text.Spoiler>spoiler</Text.Spoiler>
<Break />

I also mention you: <Mention username='sqrtapp' />
</>
))
});

Expand Down
13 changes: 0 additions & 13 deletions packages/fmt/bold.ts

This file was deleted.

58 changes: 0 additions & 58 deletions packages/fmt/cash.ts

This file was deleted.

16 changes: 0 additions & 16 deletions packages/fmt/code.ts

This file was deleted.

21 changes: 0 additions & 21 deletions packages/fmt/command.ts

This file was deleted.

13 changes: 0 additions & 13 deletions packages/fmt/common/break.tsx

This file was deleted.

22 changes: 0 additions & 22 deletions packages/fmt/common/command.tsx

This file was deleted.

44 changes: 0 additions & 44 deletions packages/fmt/common/email.tsx

This file was deleted.

12 changes: 0 additions & 12 deletions packages/fmt/common/hash.tsx

This file was deleted.

8 changes: 0 additions & 8 deletions packages/fmt/common/index.ts

This file was deleted.

19 changes: 0 additions & 19 deletions packages/fmt/common/mention.tsx

This file was deleted.

36 changes: 0 additions & 36 deletions packages/fmt/common/phone.tsx

This file was deleted.

Loading

0 comments on commit 1bfdd6d

Please sign in to comment.