This commit is contained in:
Nikita Gopienko 2019-08-01 13:50:31 +03:00
commit 514b8ee4b3
2 changed files with 13 additions and 3 deletions

View File

@ -121,11 +121,13 @@ const IconWrapper = styled.span`
const DropDownItem = React.memo(props => {
//console.log("DropDownItem render");
const { isSeparator, isUserPreview, label, icon } = props;
const color = props.disabled || props.isHeader ? '#A3A9AE' : '#333333';
return (
<StyledDropdownItem {...props} >
{icon &&
<IconWrapper>
<IconButton size={16} iconName={icon} color={props.disabled || props.isHeader ? '#A3A9AE' : '#333333'} />
<IconButton size={16} iconName={icon} color={color} />
</IconWrapper>
}
{isSeparator ? '\u00A0' : !isUserPreview && label}

View File

@ -30,6 +30,14 @@ const StyledPage = styled.div`
width: 80px;
`;
const previousAction = () => {
console.log('Prev action');
};
const nextAction = () => {
console.log('Next action');
};
const Paging = props => {
//console.log("Paging render");
const { previousLabel, nextLabel, previousAction, nextAction, pageItems, perPageItems, openDirection, disablePrevious, disableNext } = props;
@ -72,8 +80,8 @@ Paging.propTypes = {
}
Paging.defaultProps = {
previousAction: () => console.log('Prev action'),
nextAction: () => console.log('Next action'),
previousAction: previousAction,
nextAction: nextAction,
disablePrevious: false,
disableNext: false
}