mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 11:17:49 +01:00
Refactor CSS (#116)
Refactor CSS files and structure. Also refactors some html and React components for a smarter use of CSS classes.
This commit is contained in:
committed by
GitHub
parent
35c427d9f6
commit
8e75a85873
21
app/javascript/components/common/Button.tsx
Normal file
21
app/javascript/components/common/Button.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import * as React from 'react';
|
||||
|
||||
interface Props {
|
||||
children: any;
|
||||
onClick(e: React.FormEvent): void;
|
||||
className?: string;
|
||||
outline?: boolean;
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
const Button = ({ children, onClick, className = '', outline = false, disabled = false}: Props) => (
|
||||
<button
|
||||
onClick={onClick}
|
||||
className={`${className} btn btn-${outline ? 'outline-' : ''}dark`}
|
||||
disabled={disabled}
|
||||
>
|
||||
{children}
|
||||
</button>
|
||||
);
|
||||
|
||||
export default Button;
|
||||
Reference in New Issue
Block a user