-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** | ||
* @file React component. | ||
* @copyright Yury Korotovskikh <u.korotovskiy@nil.foundation> | ||
*/ | ||
|
||
import { globalStyles } from '@/styles/globalStyles'; | ||
Check warning on line 6 in src/features/dashboard/components/StatementInfoPanel/StatementDetailedInfo.tsx GitHub Actions / build / Build
Check warning on line 6 in src/features/dashboard/components/StatementInfoPanel/StatementDetailedInfo.tsx GitHub Actions / build / Build
Check warning on line 6 in src/features/dashboard/components/StatementInfoPanel/StatementDetailedInfo.tsx GitHub Actions / build / Build
|
||
import type { ReactElement } from 'react'; | ||
import { useStyletron } from 'styletron-react'; | ||
|
||
type StatementDetailedInfoProps = { | ||
description?: string; | ||
url?: string; | ||
}; | ||
|
||
/** | ||
* Statement detailed info component. | ||
* | ||
* @param {StatementDetailedInfoProps} props Props. | ||
* @returns React component. | ||
*/ | ||
export const StatementDetailedInfo = ({ | ||
description, | ||
url, | ||
}: StatementDetailedInfoProps): ReactElement => { | ||
const [css] = useStyletron(); | ||
|
||
return ( | ||
<div> | ||
<div> | ||
<span className={css(globalStyles.textMuted)}>Description:</span> | ||
{description ? ` ${description}` : 'No description'} | ||
</div> | ||
{url && ( | ||
<div> | ||
<span className={css(globalStyles.textMuted)}>Url:</span>{' '} | ||
<a | ||
href={url} | ||
rel="noreferrer" | ||
target="_blank" | ||
> | ||
{url} | ||
</a> | ||
</div> | ||
)} | ||
</div> | ||
); | ||
}; |