mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-26 04:02:51 +01:00
e9a092350f
-improve help screen bugfixes
26 lines
744 B
JavaScript
26 lines
744 B
JavaScript
import React from 'react';
|
|
|
|
import { getSegColors } from './util';
|
|
|
|
const SetCutpointButton = ({ currentCutSeg, side, Icon, onClick, title, style }) => {
|
|
const {
|
|
segActiveBgColor: currentSegActiveBgColor,
|
|
segBorderColor: currentSegBorderColor,
|
|
} = getSegColors(currentCutSeg);
|
|
|
|
const start = side === 'start';
|
|
const border = `4px solid ${currentSegBorderColor}`;
|
|
|
|
return (
|
|
<Icon
|
|
size={13}
|
|
title={title}
|
|
role="button"
|
|
style={{ color: 'white', padding: start ? '4px 4px 4px 2px' : '4px 2px 4px 4px', borderLeft: start && border, borderRight: !start && border, background: currentSegActiveBgColor, borderRadius: 6, ...style }}
|
|
onClick={onClick}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default SetCutpointButton;
|