How to use the @material-ui/styles.withStyles function in @material-ui/styles

To help you get started, we’ve selected a few @material-ui/styles examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github quiltdata / quilt / catalog / app / components / Preview / renderers / DataFrame.js View on Github external
import cx from 'classnames'
import PT from 'prop-types'
import * as React from 'react'
import * as RC from 'recompose'
import { withStyles } from '@material-ui/styles'

import * as RT from 'utils/reactTools'

const DataFrame = RT.composeComponent(
  'Preview.renderers.DataFrame',
  RC.setPropTypes({
    children: PT.string,
    className: PT.string,
  }),
  withStyles(({ palette, spacing: { unit } }) => ({
    root: {
      width: '100%',
    },
    wrapper: {
      overflow: 'auto',

      '& table.dataframe': {
        border: 'none',
        minWidth: '100%',
        width: 'auto',

        '& tr:nth-child(even)': {
          backgroundColor: palette.grey[100],
        },

        '& th, & td': {
github ETCDEVTeam / emerald-wallet / packages / react-app / src / transactions / List / TxItemView / Status.tsx View on Github external
return (
      <div>
        <span>Success</span> <br>
        <span>{tsFormatter(props.txTimestamp)}</span>
      </div>
    );
  }

  return null;
};

function defaultTimestampFormatter (timestamp: any): string {
  return timestamp;
}

export default withStyles(styles)(Status);
github openintegrationhub / openintegrationhub / services / web-ui / src / component / flows / index.js View on Github external
const mapStateToProps = state => ({
    flows: state.flows,
});
const mapDispatchToProps = dispatch => bindActionCreators({
    getFlows,
    createFlow,
    getFlowsPage,
}, dispatch);

export default flow(
    connect(
        mapStateToProps,
        mapDispatchToProps,
    ),
    withStyles(useStyles),
)(Flows);
github chronisp / gatsby-starter / src / components / layout / Layout.js View on Github external
renderView={props =&gt; <div>}
    className={classes.container}&gt;
    <div>
      <header>
      
        <main>{children}</main>
      
    </header></div>
  
);

export default withStyles(styles)(Layout);
</div>
github openintegrationhub / openintegrationhub / services / web-ui / src / component / table / table-toolbar.js View on Github external
);
};

TableToolbar.propTypes = {
    classes: PropTypes.object.isRequired,
    numSelected: PropTypes.number.isRequired,
};

export default withStyles(toolbarStyles)(TableToolbar);
github vinioo / knowshare-front / src / components / Navbar / index.js View on Github external
<li>
                <button>Cadastrar</button>
              </li>
            
            <div class="burger">
              <div class="line1">
              <div class="line2">
              <div class="line3">
            </div>
          </div>
        
      </div>
    );
  }
}
export default withStyles(styles)(Navbar);
</div>
github AnuraConfig / anura-server / src / pages / GlobalConfig.js View on Github external
this.handleUpdate(data, error)
                  return (<button color="{this.state.update" size="large"> updateGlobalVariable(this.makeGlobalVariable())}&gt;
                    Save Config
                  </button>)
                }}
              
            )
        }}
      
    )
  }
}

export default withStyles(styles)(GlobalVariable)
github kalmhq / kalm / frontend / src / widgets / Label.tsx View on Github external
{props.children}
    
  );
});
H3.displayName = "H3";

export const H4 = withStyles(styles)((props: LabelProps) =&gt; {
  return (
    <label>
      {props.children}
    </label>
  );
});
H4.displayName = "H4";

export const H5 = withStyles(styles)((props: LabelProps) =&gt; {
  return (
    <label>
      {props.children}
    </label>
  );
});
H5.displayName = "H5";

export const H6 = withStyles(styles)((props: LabelProps) =&gt; {
  return (
    <label>
      {props.children}
    </label>
  );
});
H6.displayName = "H6";
github Colt / react-colors / colors-app / src / PaletteList.js View on Github external
);
  }
}
export default withStyles(styles)(PaletteList);
github csweichel / werft / pkg / webui / src / JobView.tsx View on Github external
interface JobMetadataItemProps extends WithStyles {
    label: string
    title?: string
    xs?: 1|2|3|4|5|6|7|8|9
}

class JobMetadataItemPropsImpl extends React.Component {
    render() {
        return 
            <span title="{this.props.title}">{this.props.label}</span>
            {this.props.children}
        
    }
}

const JobMetadataItemProps = withStyles(styles)(JobMetadataItemPropsImpl);