mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-23 19:47:03 -04:00

* Move common components to the `common` directory * rename style directory * Move ForkAwesome to common * Move initializers and restructure application-loader.tsx
20 lines
633 B
TypeScript
20 lines
633 B
TypeScript
import React from 'react'
|
|
import { Button } from 'react-bootstrap'
|
|
import { ForkAwesomeIcon } from '../../../../common/fork-awesome/fork-awesome-icon'
|
|
import './pin-button.scss'
|
|
|
|
export interface PinButtonProps {
|
|
isPinned: boolean;
|
|
onPinClick: () => void;
|
|
isDark: boolean;
|
|
className?: string
|
|
}
|
|
|
|
export const PinButton: React.FC<PinButtonProps> = ({ isPinned, onPinClick, isDark, className }) => {
|
|
return (
|
|
<Button variant={isDark ? 'secondary' : 'light'}
|
|
className={`history-pin ${className || ''} ${isPinned ? 'pinned' : ''}`} onClick={onPinClick}>
|
|
<ForkAwesomeIcon icon="thumb-tack"/>
|
|
</Button>
|
|
)
|
|
}
|