UNPKG

@jupyterlab/git

Version:

A JupyterLab extension for version control using git

41 lines (40 loc) 969 B
import { style } from 'typestyle'; export const actionButtonStyle = style({ flex: '0 0 auto', background: 'none', lineHeight: '0px', padding: '0px 0px', width: '16px', border: 'none', outline: 'none', cursor: 'pointer', margin: '0 4px', $nest: { '&:active': { transform: 'scale(1.272019649)', overflow: 'hidden', backgroundColor: 'var(--jp-layout-color3)' }, '&:disabled': { opacity: 0.4, background: 'none', cursor: 'not-allowed' }, '&:hover': { backgroundColor: 'var(--jp-layout-color2)' } } }); export const hiddenButtonStyle = style({ display: 'none' }); export const showButtonOnHover = (() => { const styled = { $nest: {} }; const selector = `&:hover .${hiddenButtonStyle}`; styled.$nest[selector] = { display: 'block' }; return styled; })();