Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HTML components for statements #2798

Merged
merged 2 commits into from
May 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions packages/page-claims/src/Statement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
import { StatementKind } from '@polkadot/types/interfaces';

import React from 'react';
import ReactMd from 'react-markdown';
import styled from 'styled-components';

import { getStatementMd, getStatementUrl } from './util';
import RegularStatement from './statements/regular';
import SaftStatement from './statements/saft';
import { useTranslation } from './translate';
import { getStatementUrl } from './util';

export interface Props{
export interface Props {
className?: string;
kind: StatementKind;
}
Expand All @@ -26,11 +27,9 @@ function Statement ({ className, kind }: Props): React.ReactElement<Props> | nul
<a href={statementUrl}
rel='noopener noreferrer'
target='_blank'>{statementUrl}</a>
<ReactMd
className='statement'
escapeHtml={false}
source={getStatementMd(kind)}
/>
<div className='statement'>
{kind.isDefault ? <RegularStatement /> : <SaftStatement />}
</div>
</div>
);
}
Expand Down
126 changes: 0 additions & 126 deletions packages/page-claims/src/md/regular.md

This file was deleted.

26 changes: 0 additions & 26 deletions packages/page-claims/src/md/saft.md

This file was deleted.

Loading