]>
cat aescling's git repositories - mastodon.git/blob - app/javascript/mastodon/features/report/components/status_check_box.js
1 import React
from 'react';
2 import PropTypes
from 'prop-types';
3 import ImmutablePropTypes
from 'react-immutable-proptypes';
4 import Toggle
from 'react-toggle';
6 export default class StatusCheckBox
extends React
.PureComponent
{
9 status: ImmutablePropTypes
.map
.isRequired
,
10 checked: PropTypes
.bool
,
11 onToggle: PropTypes
.func
.isRequired
,
12 disabled: PropTypes
.bool
,
16 const { status
, checked
, onToggle
, disabled
} = this.props
;
17 const content
= { __html: status
.get('contentHtml') };
19 if (status
.get('reblog')) {
24 <div className
='status-check-box'>
26 className
='status__content'
27 dangerouslySetInnerHTML
={content
}
30 <div className
='status-check-box-toggle'>
31 <Toggle checked
={checked
} onChange
={onToggle
} disabled
={disabled
} />
This page took 0.06876 seconds and 4 git commands to generate.