mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 12:13:57 +00:00
style
This commit is contained in:
parent
4c5db6483d
commit
85ba6bb05c
@ -35,6 +35,11 @@ const StyledIconSpan = styled.span`
|
||||
color: ${(props) => (props.disabled ? 'gray' : 'blue')};
|
||||
`;
|
||||
|
||||
const ButtonDivInner = styled.div`
|
||||
position: relative;
|
||||
top: 2px;
|
||||
`;
|
||||
|
||||
export default function ToolbarButton({ children, onClick, icon = undefined, disabled = undefined }) {
|
||||
const Icon = icon;
|
||||
return (
|
||||
@ -44,12 +49,14 @@ export default function ToolbarButton({ children, onClick, icon = undefined, dis
|
||||
}}
|
||||
disabled={disabled}
|
||||
>
|
||||
<ButtonDivInner>
|
||||
{Icon && (
|
||||
<StyledIconSpan disabled={disabled}>
|
||||
<i className={icon} />
|
||||
</StyledIconSpan>
|
||||
)}
|
||||
{children}
|
||||
</ButtonDivInner>
|
||||
</ButtonDiv>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user