Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

[FRNT-488] Fix Grid and Column #94

Merged
merged 1 commit into from
Apr 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/ui/templates/grid/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import styled from 'styled-components';
import styled, { StyledComponent } from 'styled-components';

interface GridProps {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

мб лучше разделить эти 2 компонента, вынести их в elements (как в примере с input), а уже в templates cобрать сам grid?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В этой ветке я только баги правлю

columns: number;
columns?: number;
}

interface ColumnProps {
size: number;
size?: number;
}

const map = (properties: GridProps) => ({
Expand All @@ -20,8 +20,8 @@ export const Grid = styled.div.attrs(map)`
display: grid;
width: 100%;
grid-template-columns: repeat(var(--local-columns), 1fr);
`;
` as StyledComponent<'div', Record<string, unknown>, GridProps>;

export const Column = styled.div.attrs(columnMap)`
grid-column: var(--local-size) span;
`;
` as StyledComponent<'div', Record<string, unknown>, ColumnProps>;