1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-26 04:02:51 +01:00
lossless-cut/src/SetCutpointButton.jsx
Mikael Finstad e9a092350f improvements
-improve help screen
bugfixes
2020-04-09 18:13:16 +08:00

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;