@latte-macchiat-io/latte-vanilla-components 0.0.222 → 0.0.223
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -4,13 +4,15 @@ import { columnsRecipe, ColumnsVariants } from './styles.css';
|
|
4
4
|
|
5
5
|
export type ColumnsProps = React.HTMLAttributes<HTMLDivElement> &
|
6
6
|
ColumnsVariants & {
|
7
|
-
columns: number[];
|
7
|
+
columns: number[];
|
8
8
|
children: React.ReactNode;
|
9
9
|
};
|
10
10
|
|
11
11
|
export const Columns = ({ align, vAlign, columns, children, className }: ColumnsProps) => {
|
12
|
+
const columnsValue = columns.map((c) => `${c}fr`).join(' ');
|
13
|
+
|
12
14
|
return (
|
13
|
-
<div className={clsx(columnsRecipe({ align, vAlign }), className)} style={{ ['--columns' as never]:
|
15
|
+
<div className={clsx(columnsRecipe({ align, vAlign }), className)} style={{ ['--columns' as never]: columnsValue }}>
|
14
16
|
{children}
|
15
17
|
</div>
|
16
18
|
);
|