1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Introduce reusable component for spacing between other components

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2022-08-17 14:08:02 +03:00
parent d7de5ce467
commit 43e0c49f06
No known key found for this signature in database
GPG Key ID: 8C6CFB2FFFE8F68A
2 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,14 @@
@mixin gutterSize(
$sizeName,
$size
) {
.size-#{$sizeName} {
min-width: $size;
min-height: $size;
}
}
$baseline: 8px;
@include gutterSize('sm', 2 * $baseline);
@include gutterSize('md', 3 * $baseline);

View File

@ -0,0 +1,20 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import React from "react";
import { cssNames } from "../../utils";
import styles from "./gutter.module.scss";
interface GutterProps {
size?: "sm" | "md";
}
const Gutter = ({ size = "md" }: GutterProps) => {
const classNames = cssNames(styles[`size-${size}`]);
return <div className={classNames} />;
};
export default Gutter;