mirror of
https://github.com/wassname/talk.git
synced 2026-08-11 11:27:10 +08:00
Rolling back classes
This commit is contained in:
@@ -14,10 +14,15 @@ import styles from './DraftArea.css';
|
||||
export default class DraftArea extends React.Component {
|
||||
renderCharCount() {
|
||||
const { value, maxCharCount } = this.props;
|
||||
const className = cn(styles.charCount, 'talk-commentbox-char-count', {
|
||||
[`${styles.charMax} talk-commentbox-char-max`]:
|
||||
value.length > maxCharCount,
|
||||
});
|
||||
|
||||
const className = cn(
|
||||
styles.charCount,
|
||||
'talk-plugin-commentbox-char-count',
|
||||
{
|
||||
[`${styles.charMax} talk-plugin-commentbox-char-max`]:
|
||||
value.length > maxCharCount,
|
||||
}
|
||||
);
|
||||
const remaining = maxCharCount - value.length;
|
||||
|
||||
return (
|
||||
@@ -52,7 +57,9 @@ export default class DraftArea extends React.Component {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className={cn(styles.container, 'talk-commentbox-container')}>
|
||||
<div
|
||||
className={cn(styles.container, 'talk-plugin-commentbox-container')}
|
||||
>
|
||||
<label htmlFor={id} className="screen-reader-text" aria-hidden={true}>
|
||||
{label}
|
||||
</label>
|
||||
|
||||
@@ -12,7 +12,7 @@ const DraftAreaContent = ({
|
||||
disabled,
|
||||
}) => (
|
||||
<textarea
|
||||
className={cn(styles.content, 'talk-commentbox-textarea')}
|
||||
className={cn(styles.content, 'talk-plugin-commentbox-textarea')}
|
||||
value={value}
|
||||
placeholder={placeholder}
|
||||
id={id}
|
||||
|
||||
@@ -9,7 +9,7 @@ import CommentForm from '../containers/CommentForm';
|
||||
import { notifyForNewCommentStatus } from '../helpers';
|
||||
|
||||
// TODO: (kiwi) Need to adapt CSS classes post refactor to match the rest.
|
||||
export const name = 'talk-commentbox';
|
||||
export const name = 'talk-plugin-commentbox';
|
||||
|
||||
/**
|
||||
* Container for posting a new Comment
|
||||
|
||||
@@ -82,8 +82,6 @@ DraftAreaContainer.propTypes = {
|
||||
|
||||
const slots = ['draftArea'];
|
||||
|
||||
console.log('spreaded fragment', getSlotFragmentSpreads(slots, 'comment'));
|
||||
|
||||
export default withFragments({
|
||||
root: gql`
|
||||
fragment TalkEmbedStream_DraftArea_root on RootQuery {
|
||||
|
||||
@@ -97,8 +97,8 @@ module.exports = {
|
||||
elements: {
|
||||
logoutButton: '.talk-stream-userbox-logout',
|
||||
signInButton: '#coralSignInButton',
|
||||
commentBoxTextarea: '.talk-commentbox-textarea',
|
||||
commentBoxPostButton: '.talk-commentbox-button',
|
||||
commentBoxTextarea: '.talk-plugin-commentbox-textarea',
|
||||
commentBoxPostButton: '.talk-plugin-commentbox-button',
|
||||
firstComment: '.talk-stream-comment.talk-stream-comment-level-0',
|
||||
firstCommentContent:
|
||||
'.talk-stream-comment.talk-stream-comment-level-0 .talk-stream-comment-content',
|
||||
|
||||
Reference in New Issue
Block a user