1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/frontend/src/component/common/Gradient/Gradient.tsx

31 lines
551 B
TypeScript
Raw Normal View History

interface IGradientProps {
from: string;
to: string;
style?: object;
}
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;