All files / app/components ResetLink.tsx

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31                        3x           3x 1x                   3x  
import React from 'react';
import { style } from 'app/styles';
import { UndoIcon } from './UndoIcon';
 
export interface ResetLinkProps {
  // This is the text or JSX that gets wrapped in stacked label
  children: string | JSX.Element | JSX.Element[];
  onClick: (evt) => void;
  title?: string;
  style?: object;
}
 
const defaultContainerStyle = {
  _extends: ['smallerText', 'link', 'inlineBlock'],
  marginRight: '@margins.pageRight+px',
  marginLeft: '@margins.medium+px',
};
 
export const ResetLink = (props: ResetLinkProps): JSX.Element => {
  return (
    <div
      style={style(defaultContainerStyle, props.style)}
      onClick={props.onClick}
    >
      <UndoIcon height={10} width={10} /> {props.children}
    </div>
  );
};
 
ResetLink.displayName = 'ResetLink';