mirror of
https://github.com/wassname/talk.git
synced 2026-08-03 13:20:59 +08:00
Add classname hooks for default and active state
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
import React from 'react';
|
||||
import cn from 'classnames';
|
||||
import styles from './SortOption.css';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
const pluginName = 'talk-slot-viewing-options-sort-option';
|
||||
|
||||
export default class SortOption extends React.Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<label className={styles.label}>
|
||||
<label className={cn([
|
||||
styles.label,
|
||||
pluginName,
|
||||
{ [`${pluginName}-active`]: this.props.active },
|
||||
])}>
|
||||
<input
|
||||
type="radio"
|
||||
onChange={this.props.setSort}
|
||||
|
||||
Reference in New Issue
Block a user