mirror of
https://github.com/Unleash/unleash.git
synced 2024-10-18 20:09:08 +02:00
531d969fa6
* refactor: add missing input field labels * refactor: add missing className prop * refactor: add missing image labels * refactor: fix forgot password title size * refactor fix StandaloneLayout page landmarks * refactor: improve project page title * refactor: add autoFocus to login fields
34 lines
603 B
TypeScript
34 lines
603 B
TypeScript
import React from 'react';
|
|
|
|
interface IGradientProps {
|
|
from: string;
|
|
to: string;
|
|
style?: object;
|
|
className?: string;
|
|
}
|
|
|
|
const Gradient: React.FC<IGradientProps> = ({
|
|
children,
|
|
from,
|
|
to,
|
|
style,
|
|
...rest
|
|
}) => {
|
|
return (
|
|
<div
|
|
style={{
|
|
background: `linear-gradient(${from}, ${to})`,
|
|
height: '100%',
|
|
width: '100%',
|
|
position: 'relative',
|
|
...style,
|
|
}}
|
|
{...rest}
|
|
>
|
|
{children}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default Gradient;
|